[SOLVED] light_world.lua incorrect lighting direction
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: light_world.lua incorrect lighting direction
I'll try it tomorrow again and I'll report back if that was the case
Re: light_world.lua incorrect lighting direction
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 = ...
Last edited by pgimeno on Thu Oct 27, 2016 9:01 pm, edited 1 time in total.
Re: light_world.lua incorrect lighting direction
Hi,
actually I tried it out right now. As it turns out, Slime was right!
swapped with
gets the job done!
Thank you both for your enormous help!
Have a good one
actually I tried it out right now. As it turns out, Slime was right!
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);
Thank you both for your enormous help!
Have a good one
Who is online
Users browsing this forum: Bing [Bot] and 10 guests