Question by
RandomPoint · Nov 19, 2019 at 09:42 PM ·
shadervrstereo
How to modify Unlit shader to work in Single Pass Stereo mode for VR?
Is there a simple way to modify this shader that blends two textures to make it work properly in Single Pass Stereo mode for VR? Right now everything is displaced in one eye when using Single Pass mode.
Shader "Custom/UnlitFade"
{
Properties {
_Blend1 ("Blend1", Range (0, 1) ) = 1
_MainTex ("Texture 1", 2D) = ""
_Texture2 ("Texture 2", 2D) = ""
}
SubShader {
Pass {
SetTexture[_Texture2]
SetTexture[_MainTex] {
ConstantColor (0,0,0, [_Blend1])
Combine texture Lerp(constant) previous
}
}
}
}
I have looked at https://docs.unity3d.com/Manual/SinglePassStereoRendering.html but it only describes functions that can be used with lower-level CG shader code.
Comment
Your answer
Follow this Question
Related Questions
Outline Shader in VR 0 Answers
Single Pass rendering into a double-wide RenderTexture from a script? 0 Answers
Everything turns pink when SteamVR is imported into Lightweight render pipeline for VR 2 Answers
XR Toolkit Stereo Rendering 0 Answers
Volumetric Light with VR in URP have a weird clipping... Any ideas? 0 Answers