(first post
)
Hey everybody!
I'm writing a shader for this transparent, green, glowy material that needs to look very "chemical-ish".
I'm running into some issues with getting a cube map to assign to a circular alpha mask that needs to pan up and drift around (bubbles). I'm brand new at writing shaders, so I'm sure there's a very efficient way to do this.
As I'm writing this I'm remembering that a cube map is a three dimensional record, and the mask for the bubble would be a 2d image. Is there a way I can set different faces of the cube map to appear depending on which world direction the material is facing?
Thanks guys!
Replies
I quickly slapped together a little example for you.
Don't mind the graphics, if you use proper textures it'll look good, it's mainly the normal map that's destroying the reflection here. I suggest you use something like a simple dot for a normal so that the reflection bends around the edges a bit.
I added some panning to everything for fun to show you how that works. It stretches the reflection in real time (which can be quite handy really) but depending on what you want you can also disable that completely and not input the multiplier at all and just go with the reflection -> transform -> into UV slot for the texture.
Here's the reflection without the normal input to show you the difference.