Page MenuHome

Mirror influence of environment texture in Blender viewport
ClosedPublic

Authored by Alexander Romanov (a.romanov) on Feb 10 2016, 5:10 PM.

Details

Summary

This patch implements Mirror influence for environment textures. Approach matches the one from BI.


See the video https://youtu.be/BskgCv6dcIE
Example:
Alexander (Blend4Web Team)

Diff Detail

Repository
rB Blender

Event Timeline

Alexander Romanov (a.romanov) retitled this revision from to Mirror influence of environment texture in Blender viewport .Feb 10 2016, 5:10 PM
Alexander Romanov (a.romanov) updated this object.
Alexander Romanov (a.romanov) updated this revision to Diff 6042.

Hi! This is very cool. I just tested and it fit the internal render, no problem for me. I've no particular comment about the code as I don't understand it. (we have a patch for game engine to have the viewport background, so Blender Internal + Viewport + BGE will have almost exaclty the same look. That's very cool :) )

Brecht Van Lommel (brecht) accepted this revision.

Assuming you copied all this logic from Blender Internal and tested that it works the same, looks good to me. Just one minor thing that can be cleaned up.

source/blender/gpu/intern/gpu_material.c
1616

zerro should be zero, but actually we have set_rgba_zero for this, so no need to create a uniform.

This revision is now accepted and ready to land.Feb 11 2016, 10:04 PM

This looks great!

Just a reminder we're in BCon4.

source/blender/gpu/intern/gpu_material.c
1266

Shouldn't this be | instead of +? I don't have the source in front of me but this seems weird.

Alexander Romanov (a.romanov) marked 2 inline comments as done.Feb 12 2016, 9:06 AM
Alexander Romanov (a.romanov) retitled this revision from Mirror influence of environment texture in Blender viewport to Mirror influence of environment texture in Blender viewport.
Alexander Romanov (a.romanov) edited edge metadata.
Alexander Romanov (a.romanov) updated this revision to Diff 6053.
  • '+' replaced by '|' in logic expression; used set_rgba_zero

Will wait for 2.77 be in branch.

source/blender/gpu/intern/gpu_material.c
1266

These flags do not overlap each other, but you are right, "|" is more valid to use.

This revision was automatically updated to reflect the committed changes.