Author Topic: Everytime I turn on Shaders..  (Read 2261 times)

When I put on shaders with the particles it makes these Black,Ugly,Squares.


What's With that?

Pics- Will add them later

what's this got to do with suggestions or requests

what's this got to do with suggestions or requests
he obviously wants this to happen each time everyone turns on shaders.

No, Its just that they looked better on the pictures I saw.

And this is my first time on the fourms I just wanted to know why it does this..

Sorry If I put it in the wrong topic.

This happens to me, or at least used to. I think our graphics cards are not quite supported.

Thanks,I'll Try to get a new one if that is the problem.

I used to have intel integrated, this would happen on minimum. It's a video card problem.

Thanks guys. You really helped me.

It's a problem regarding the way shadows are handled for particles. This bug seems to happen a lot when doing quick modifications to shaders - I have no idea why.
They're even handled differently in the shader code:

Code: [Select]
   // Apply lighting and fog.
   vec4 fragColor = vec4(0.0f, 0.0f, 0.0f, 0.0f);
   if(isParticle == 1)
   {
      vec4 texAlbedo = texture2D(tex, texCoord);


      fragColor = texAlbedo * gl_Color;
      fragColor.a = texAlbedo.a * gl_Color.a;
         
      vec4 dirLightDirect = (dirLightColor * occlusionFactor) + (dirLightAmbient * occlusionFactor) + (dirShadowColor * (1.0f - occlusionFactor));
      vec4 plt = accumulateParticlePointLights();

      vec4 lightTotal = dirLightDirect + plt;
      lightTotal.x = clamp(lightTotal.x, 0.0f, 1.2f);
      lightTotal.y = clamp(lightTotal.y, 0.0f, 1.2f);
      lightTotal.z = clamp(lightTotal.z, 0.0f, 1.2f);

      fragColor = texAlbedo * gl_Color * lightTotal;

      applyFog(fragColor);
         fragColor.a = texAlbedo.a * gl_Color.a;
     
   }
   else
   {
      applyLighting(fragColor, albedo, occlusionFactor);
      applyFog(fragColor);
   }

this happens to me too and it's strange because they actually used to work for me for about 2 weeks, then they suddenly became this.

this happens to me too and it's strange because they actually used to work for me for about 2 weeks, then they suddenly became this.
This. During my not having an independent video card experience, I could run minimum with no problems then after one update all emitters broke.

everything also turns really dark