Re: light_world.lua incorrect lighting direction
Posted: Thu Oct 27, 2016 8:48 pm
I'll try it tomorrow again and I'll report back if that was the case
Just use your default window resolution to do this:0x29a wrote:Do you happen to know how to do it? I'd be forever in your debt.
Code: Select all
vec4 effect(vec4 color, Image texture, vec2 texture_coords, vec2 pixel_coords) {
pixel_coords.y = 600.0 - pixel_coords.y; // <-- Insert this, changing 600.0 to your default height
float dist = ...
Code: Select all
vec3 normal = normalize(vec3(normalColor.r,invert_normal ? 1 - normalColor.g : normalColor.g, normalColor.b) * 2.0 - 1.0);
Code: Select all
vec3 normal = normalize(vec3(normalColor.r,invert_normal ? normalColor.g : 1 - normalColor.g, normalColor.b) * 2.0 - 1.0);