Blockland Forums > Suggestions & Requests

Everytime I turn on Shaders..

Pages: << < (2/3) > >>

Greek2me:

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

Bolt the thunderhog:

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

Subpixel:

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

Bolt the thunderhog:

Thanks guys. You really helped me.

Port:

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: ---   // 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);
   }

--- End code ---


Pages: << < (2/3) > >>

Go to full version