0
Lõpetatud

Older Macbook Pro: no refraction, displacement

ed 11 aastat tagasi uuendaja Freya Holmér (Developer) 11 aastat tagasi 6

It's not a surprise that older hardware can't support all these fantastic new shaders. I'm just writing my experience from loading the sample scene, as the first thing I did when I installed the Alpha 0.12.


My Macbook Pro 2010 has an NVIDIA GeForce 320M with 256 MB.


 * The ball and torus with the sample displacement shader are black.


 * The large quad with a refraction shader is black.


 * The knot with a vertex animation is not animated as I've seen with the GIF on the forums.  The knot does have two thick glowing parts, and the shape changes if I switch to a different material, so the shader is working.  Manually updating the "Sharpness" or "Inner Normals" offsets do not change the knot.  Is a scene script responsible for rolling the red striped texture offset, and if so, how?

Hi!

Thanks for the feedback :)

If you select the torus knot, and press "Open in Shader Forge" in the inspector - does it animate?
Are you running Unity free or Pro?

I'm not sure if that GPU has DX11 support, and you need to be running Windows as well for the DX11 effects.

Hm, after posting this, the refraction started working.  Almost.  I don't know why it was not working, then it started working.  The console shows nothing useful, except a warning "HDR RenderTexture format is not supported on this platform."  Not clear if that's related to the refraction or something else.


http://i.imgur.com/kBSCphu.png


As for the refraction, it looks like the vector calculated through the quad is not correct; the image is flipped.  Eye vector is downward toward quad, so refracting vector should be somewhere between same downward direction and anti-normal.  (Same vector is IOR 1.0, anti-normal is IOR infinity, tangent is IOR 0 I think.)  An IOR slider would be an interesting way to control it.

The animated vertex shader does animate in the editor.  (The sphere textures roll west-to-east, the swelling rolls east-to-west.)  When I leave the editor, the knot is swollen in different places, but does not start animating in Scene nor Game views, in either playing or editing modes.

Oh, I am using Unity Free 4.2.1f4.

These are several separate issues in one!
1. Refraction is flipped because you're rendering in OpenGL, in which I haven't fixed the screen coordinates being flipped.

2. You don't have hardware (DX11 GPU), nor software (Windows) to support DirectX11.

3. The knot doesn't animate in-editor nor in-game, just in Shader Forge, which is a known issue: http://shaderforge.userecho.com/topic/249187-shaders-using-the-time-node-doesnt-animate-in-game/

4. The refraction was black at first because you're running Unity free, which doesn't support refraction. However, SF overrides this when you launch it for the first time.

The refraction flip issue is fixed now: http://shaderforge.userecho.com/topic/276688-mac-refraction-shader-setup-y-axis/


The animation issue is already in this thread: http://shaderforge.userecho.com/topic/249187-shaders-using-the-time-node-doesnt-animate-in-game/


And the rest are simply the result of your hardware and Unity version :)

I'll mark this as complete!