New answers tagged

1

Review the HLSL cbuffer packing rules here: https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-packing-rules HLSL packing rules are similar to performing a #pragma pack 4 with Visual Studio, which packs data into 4-byte boundaries. Additionally, HLSL packs data so that it does not cross a 16-byte boundary. Variables are packed into ...


0

Here's a quick stab at how to convert your shader code to a custom function node we can apply in a Shader Graph. First, we'll make a new text file to hold the shader code. I called mine "shaderGraphArray.cginc" const static int maxLayerCount = 8; const static float epsilon = 1E-4; int layerCount; float3 baseColours[maxLayerCount]; float ...


0

ShaderGraph generates sourcecode which you can view, copy and paste into a code-based shader, so converting or integrating a ShaderGraph shader into a code-based one is possible. However, the other way around isn't. If you want to convert a code-based shader into ShaderGraph, you have to manually rebuild it from scratch. can someone talk me through how I ...


0

Texture coordinates were wrong. The ones that I was sending to vertex buffer.


Top 50 recent answers are included