Search found 3 matches

by matty9
Wed May 09, 2018 10:56 pm
Forum: Advanced Help
Topic: Static lighting rotates with geometry
Replies: 3
Views: 950

Re: Static lighting rotates with geometry

Shading is always tricky, the rule of thumb is to keep everything always on the same space. If you use normal maps, pass every parameter to tangent space, or if you want to stay on view space, transform your normals and your lights into view space. Thanks for the tip, having trouble at the moment t...
by matty9
Wed May 09, 2018 7:08 pm
Forum: Advanced Help
Topic: Static lighting rotates with geometry
Replies: 3
Views: 950

Re: Static lighting rotates with geometry

FYI, I fixed it. I blame it on the tutorials. The shader tutorial passes through the transposed world matrix when I needed the normal world matrix. I now calculate the UV's using the Normal passed through as standard, but for the lighting multiply this normal by the normal world matrix. https://gyaz...
by matty9
Tue May 08, 2018 5:30 pm
Forum: Advanced Help
Topic: Static lighting rotates with geometry
Replies: 3
Views: 950

Static lighting rotates with geometry

So firstly, this doesn't happen when I use shaders, it works as intended if I add a light scene node then enable lighting on my nodes. However, when I disable lighting and use my own shader the light moves with the planet. Video: https://gyazo.com/a007cc2088c1a21e353d1bde49c1669a The code to set my ...