You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
USD allows depth bias in a single pass. Is there any chance to apply depth bias to a single prim?
A use case is to apply mesh decals to surfaces. The decal and the surface are co-planar. The decal needs to win depth test if both are drawn together in a single pass.
Unity allows to add "Offset Factor, Units" to a shader. Unreal allows to apply a custom offset along camera direction. Any chance in USD to support similar feature?
Unity: https://docs.unity3d.com/2021.2/Documentation/Manual/SL-Offset.html
Unreal: https://docs.unrealengine.com/4.26/en-US/WorkingWithContent/MeshDecals/
Steps to Reproduce
Create 2 coplanar meshes.
z-fighting.
System Information (OS, Hardware)
Windows 10, MSVC 2019
Package Versions
v21.05
Build Flags
N/A (default)
The text was updated successfully, but these errors were encountered:
Actually, Storm already adds an epsilon to Peye.z to the selection. It's a little different from the second "units" parameter of glPolygonOffset. glPolygonOffset adds after projection. But they are similar.
Is there any chance to extend this to each prim? For example, a bulitin primvar similar to displayColor and displayOpacity. Or get it from the material if there is one. Then, modify gl_Position.z in the vertex shader. https://github.com/PixarAnimationStudios/USD/blob/090ef0d849ced875b3b99a15e454b69148ccd8e1/pxr/imaging/hdx/shaders/selection.glslfx#L401-L408
Description of Issue
USD allows depth bias in a single pass. Is there any chance to apply depth bias to a single prim?
A use case is to apply mesh decals to surfaces. The decal and the surface are co-planar. The decal needs to win depth test if both are drawn together in a single pass.
Unity allows to add "Offset Factor, Units" to a shader. Unreal allows to apply a custom offset along camera direction. Any chance in USD to support similar feature?
Unity: https://docs.unity3d.com/2021.2/Documentation/Manual/SL-Offset.html
Unreal: https://docs.unrealengine.com/4.26/en-US/WorkingWithContent/MeshDecals/
Steps to Reproduce
System Information (OS, Hardware)
Windows 10, MSVC 2019
Package Versions
v21.05
Build Flags
N/A (default)
The text was updated successfully, but these errors were encountered: