Reflective Bump Mapping [Marty McFly]

  • Posts: 177
4 years 1 month ago #21 by kingeric1992
And I was only to de-derail it back on the shader. :whistle:

Sharing is Learning.

(now it is derailed)
@crosire
Yes, ADD-MAD. But how about SFU or ALU? I've read that they support interpolation instructions along with math like sqrt(), rcpsqrt() and stuff.

Please Log in or Create an account to join the conversation.

  • Posts: 220
4 years 1 month ago #22 by DeMondo
lerp in the shader?
color*(1-reflfactor)+reflection*reflfactor?
rofl factor??
a*(1-r) + b*r???

Guys, guys !!
Lets forget about this all, I got a splitting headache and even more after
reading about those rofl factors, a*(1-r) + b*r & lerps.

My sincere apologies for derailing the topic.
Lads: the beer is on me, well I hope you are still thirsty. Cheers!

The following user(s) said Thank You: crosire

Please Log in or Create an account to join the conversation.

  • Posts: 1221
4 years 1 month ago #23 by Marty McFly
Well reflections are applied by

result = lerp(color, reflection, reflectionamount)

where lerp(A,B,1.0) outputs B, lerp(A,B,0.0) outputs A, lerp(A,B,0.5) outputs the exact middle between A and B and so on. If I apply a threshold on reflections (as Elimina requested) the result would be black reflections where the reflections are darker than the threshold. It would work if it was color + reflection but that isn't the equation. I probably have to introduce some reflectance term, let's see...

Please Log in or Create an account to join the conversation.