Search the Community
Showing results for tags 'uusl'.
Hi, all. I am working on a VR/MR project. I had to replace scene image by another image shot by a camera. I was trying creating a custom shader for post-processing to do this. The image on the PC monitor is OK but unfortunately VR headset showed double/overlapped images. e.g. You can take the Post-processing UUSL example provided by Unigine. And add a texture assigned a local picture in the material and then output the RGB color of this texture to replace the scene image in the frag shader. Anyone knows the reason or solution? Please help me find out it. thanks!
Akshay.Patil posted a topic in RenderingHello , I am writing geometry shader using UUSL, My shader works fine with opengl , but in directX it fails , because of output variable used in DirectX Suppose I do Emit Vertex in main routine like this it works in both HLSL/GLSL MAIN_GEOM_BEGIN(GEOMETRY_OUT,GEOMETRY_IN) //some code OUT_POSITION = postionLHS; OUT_DATA(1). = colorABC; EMIT_VERTEX OUT_POSITION = postionLHS; OUT_DATA(1). = colorABC; EMIT_VERTEX OUT_POSITION = postionLHS; OUT_DATA(1). = colorABC; EMIT_VERTEX END_PRIMITIVE END_GEOM But I want to create a function like
Shader Toy has lots of great WebGL shaders. As a test, I ported this one https://www.shadertoy.com/view/llK3RR to UUSL. It's a barrel distortion with chromatic abberation. Lessons learned; Use shaders_reload Use EXPORT_SHADER(foobar) to dump out the preprocessed shader in to foobar.hlsl or foobar.glsl so you can match up the error line numbers Search+Replace of vec3 etc gets you surprisingly far. Valid GLSL things like foo = float3(0.0) break when using HLSL. Expand them as foo = float3(0.0, 0.0, 0.0) and they'll work for both Virtually all maths in ShaderToy code comes over with