Uninomicon

Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


camera

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
camera [2021/06/13 03:24]
uninomiconadmin
camera [2021/06/14 16:16]
uninomiconadmin
Line 2: Line 2:
  
 ==== Camera.SetReplacementShader ==== ==== Camera.SetReplacementShader ====
 +
 SetReplacementShader will not render objects if their original materials don't contain any properties required by the replacement shader. For example, if your replacement shader uses _MainTex, and there is an object in the scene that doesn't have _MainTex, it won't be rendered at all. SetReplacementShader will not render objects if their original materials don't contain any properties required by the replacement shader. For example, if your replacement shader uses _MainTex, and there is an object in the scene that doesn't have _MainTex, it won't be rendered at all.
 +
 +SetReplacementShader will use the Materials of the existing objects in the scene((all of the textures and instance data is still sent to the replaced)). However, it only seems to apply keywords that are registered as ''multi_compile''. Per-material keywords registered with ''shader_feature'' do not get applied. For example, if you call SetReplacementShader with the default URP ''Lit.shader'', these keywords will all be turned off:
 +{{:rider64_ulivqdfbym.png}}
  
 Shaders can be replaced in the SceneView using ''[[sceneview|SceneView]].SetSceneViewShaderReplace''. Shaders can be replaced in the SceneView using ''[[sceneview|SceneView]].SetSceneViewShaderReplace''.
camera.txt ยท Last modified: 2021/06/14 16:16 by uninomiconadmin