I recently upgraded to MonoGame 3.5 and hadn’t upgraded since 3.2 I believe.
When recompiling, the shaders make everything look extremely transparent and just weird.
It was not like this before, and I use the same settings.
Please compare these two screenshots, the first one from my game released back in June last year, and the screenshot after it when upgrading to 3.5 and recompiling bloom-shaders: Screenshot 1 Screenshot 2
And there will be a 6th, 7th, … because people don’t search for old fixes. Even if some people spend valuable time on documentation :(.
Anyway, thanks to you Ravendarke, I will also need the fix soon.
Maybe putting a sort of tag in the topic title to tell which version of monogame would help newcommers ? like [3.5], [3.6.xxx - dev branch]
Some solutions found on the forum may be not as up to date as expected between framework’s version.
Since you are working on app for low performance device don´t forget to cache your parameters later.
As such: bloomBase = bloomCombineEffect.Parameters["BaseTexture"]; //somewhere in iniciliaziation of postprocess
Just a side question - why is this better?
It should be the same whether i do … fx.Parameters[“fooParam”].SetValue(vec3) or fooParam = vec3, no? I mean isn’t fooParam just a reference anyways? Can someone explain?
This way the method does not need to re traverse the array in order to find the parameter when you set it each frame. It know where it is as it is cached at initialization. And re traversing is also worse as keys are strings, not ints, the latter being faster
if (GameSettings.test == 1)
{
for (var i = 0; i < 10000; i++)
{
_lightingEffect.Parameters["DiffuseLightDirection"].SetValue(_environmentSettings.SunLightDirection);
}
}
if (GameSettings.test == 2)
{
for (var i = 0; i < 10000; i++)
{
_lightingEffectDiffuseLightDirection.SetValue(_environmentSettings.SunLightDirection);
}
}
and I get a 30 fps boost from the second one. Nice. Thanks