Thinglass Material - Glass / Water / Refraction

Ive tried to get strides Thinglass Material working in VL.stride but it crashes when i change the shading attribute to Thinglass. ( Xenko 2.1 release notes | Stride )
Has anyone ever tried to get this to work?


I guess it needs to be on the Transparent Renderstage but i have no idea how to do this.

There are some alternatives:
Porting vvvvbeta refraction shader: Glass (DX11.Effect) | vvvv
But not sure if you really need to render a sphere / cubemap

There this postfx for refraction: https://github.com/stride3d/stride/discussions/1011
I guess this wont be easy to do? Would it be possible to get the RenderTexture / Depthmap / ShadingPosition etc into the material Pipeline or does this only work for PostFX? Ive seen shader Snippets for this in the ShaderExplorer example: depthbase

Both refraction examples are very different from the Thinglass Material but i guess you would need both types of water/glass effects depending on your scene.

image

There is a Glass shadingAttribute ive missed :9 Still not sure this is what i need, would like some refraction and its not working with the localreflections PostFX

1 Like

yes, the thin glass material doesn’t do refraction, it is just transparent and reflective. however, with a material extension, you should be able to inject the refraction code. ideally, this would be added to the stride shaders.

this would need a different render stage because you have to make sure that everything else is already drawn and that the refraction is the last thing that gets applied. otherwise, there would be some objects refracted and others not. so a postfx makes sense, as it has access to the color buffer of the scene.

this might just be an order problem of the postfx, how is that rendered? just a glass material with a normal map?

this PR is also related:

1 Like

Thx for all the info :)
yes its just a glass material with a normal map

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.