Jump to content
  • Advertisement
  • entries
  • comments
  • views

vortxGE 2.0 : Self shadow

Sign in to follow this  


Time to start looking at self shadow and ways to cleanup the look as much as possible. Here's where I'm at so far. Shitty :-)


If someone could point me in the right direction that would be great. Like a great book or online reference.

I also still have problems with final output as you can see. I will fix this :-) Here's the shader.

varying vec4 vColor;
varying vec2 vTexCoord;

uniform sampler2D tex_d;
uniform sampler2D tex_n;

void main(void)
float exposure = 1.0;
vec4 oColour;

oColour = texture2D( tex_d, vTexCoord);
oColour = 1.0 - exp2( -oColour * exposure );

gl_FragColor = oColour;
gl_FragColor.a = 1.0;

Sign in to follow this  


Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!