xverse-engine / XV3DGS-UEPlugin

A Unreal Engine 5 (UE5) based plugin aiming to provide real-time visulization, management, editing, and scalable hybrid rendering of Guassian Splatting model.
Apache License 2.0
441 stars 65 forks source link

M_GS_unlit and M_GS_relight materials fail to compile on 5.3.2 #31

Open Aeromix opened 2 months ago

Aeromix commented 2 months ago

I just downloaded the "XV3DGS-v1.1.3-ue5.3" release package and am using it in a source build of 5.3.2.

I notice the splats show up and work, but the opacity custom code node is throwing errors on my end.

If I make opacity 1 or either the con_o input, I see the splat incorrectly, so i know everything else is working, except the material.

Any help would be appreicated! Thank you!

-Brandon

image

pixelpunk-DE commented 2 months ago

Can confirm for launcher, source and binary build It is an issue with Hardware Ray Tracing. When you set r.RayTracing=False they work again.

Would be great to have that fixed!

LogShaderCompilers: Warning: Failed to compile Material /Engine/Transient.M_GS_relight for platform PCD3D_SM6, Default Material will be used in game.
  /Engine/Generated/Material.ush:3466:30: warning: implicit truncation of vector type [-Wconversion]
            PixelMaterialInputs.Opacity = Local12;
                                        ^
  error: validation errors
  zzz.dxil:4483:5: error: Opcode Discard not valid in shader model lib_6_6(closesthit).
  note: at 'call void @dx.op.discard(i32 82, i1 true)' in block '#28' of function '?MaterialCHS@@YAXUFPackedMaterialClosestHitPayload@@UFRayTracingIntersectionAttributes@@@Z'.
  zzz.dxil:4469:5: error: Opcode Discard not valid in shader model lib_6_6(closesthit).
  note: at 'call void @dx.op.discard(i32 82, i1 true)' in block '#26' of function '?MaterialCHS@@YAXUFPackedMaterialClosestHitPayload@@UFRayTracingIntersectionAttributes@@@Z'.
  Validation failed.
  D3DCompileToDxil failed. Error code: Unspecified err0r (0x80004005).
MaterialEditorStats: Error: [SM6] /Engine/Generated/Material.ush:3466:30: warning: implicit truncation of vector type [-Wconversion]
            PixelMaterialInputs.Opacity = Local12;
                                        ^
MaterialEditorStats: Error: [SM6] error: validation errors
MaterialEditorStats: Error: [SM6] zzz.dxil:4483:5: error: Opcode Discard not valid in shader model lib_6_6(closesthit).
MaterialEditorStats: Error: [SM6] note: at 'call void @dx.op.discard(i32 82, i1 true)' in block '#28' of function '?MaterialCHS@@YAXUFPackedMaterialClosestHitPayload@@UFRayTracingIntersectionAttributes@@@Z'.
MaterialEditorStats: Error: [SM6] zzz.dxil:4469:5: error: Opcode Discard not valid in shader model lib_6_6(closesthit).
MaterialEditorStats: Error: [SM6] note: at 'call void @dx.op.discard(i32 82, i1 true)' in block '#26' of function '?MaterialCHS@@YAXUFPackedMaterialClosestHitPayload@@UFRayTracingIntersectionAttributes@@@Z'.
MaterialEditorStats: Error: [SM6] Validation failed.
MaterialEditorStats: Error: [SM6] D3DCompileToDxil failed. Error code: Unspecified error (0x80004005).

EDIT: I saw it working for about 1-2seconds, when opening the material. EDIT2: Added ShaderDebugInfo M_GS_relight_f2545c38a0e0f31d.zip