Box Projected EnvMap glsl node

Hi all, I have tried to transpose with glsl node material the bpcem shader made by martinsh , I use it in a realtime demo that i prepare (not on the screenshot) and its really promising for faking light reflection in box environment
it works only with sphere/Equimap,BPEM CornellBox.blend (3.35 MB).



and some interesting links

drools This is beautiful. I still can’t figure out how you’re doing it, though. I don’t know how people make custom nodes. Also, is it purely node based? Is there any coding involved?

yes, it’s only with nodes, no code (only as reference). Few lines code to few pasta nodes.


I Love it!

how fast is it?

Thx, its not really fast, blend is now available, anyone can test.

Hmm. Some weird stuff is happening for me. When I start the game, the red and green of the walls dissapears just with the tile texture and a greet glow, and when I select suzanne, the cube becomes glossy, but when I select something else the cube has a more fresnel effect to it (like suzanne does by default).

If I select the Suzanne and ress P blender crashes. Othervise it looks good in viewport, but when i start the game the colors get all green.

Unfortunately, there’s a handful of node-based effects that do not actually work in the BGE even though the viewport GLSL shows them fine (they’ve been there for years and fixing them has apparently been a low priority).

I know that multiple Vertex Color channels are one of them, it looks like the setup in the first post may be another.

Does this work better than realtime cubemap? If not, I prefer the realtime reflections.

realtime cubemap only works from one point of view. The Box Projection is different that it uses a static map, and that objects are mapped getting different reflection results in different parts of the room. You could combine the two, but BPCEM is generally a much faster technique, good for rooms, while realtime reflections could be used for certain objects where you want even more realism.

G’day mate, I’ve made my own PBR shader for BGE and I’m using your View to World and EnvrectangularUV node for Reflections. Is it okay if I can share my PBR shader with your nodes in it? I’ll credit you.