Skip to content

Implement constant buffers for HDRP global variables. #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 87 commits into from
Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
dc5f783
Fixed execution error without raytracing
JulienIgnace-Unity Nov 26, 2019
3d86f9e
Prepare Prepass refacto
JulienIgnace-Unity Nov 26, 2019
e91a1f0
Another round of preparation
JulienIgnace-Unity Nov 27, 2019
6f16b8a
Renamed XRPassScope to XRSinglePassScope
JulienIgnace-Unity Nov 27, 2019
13617b1
RenderAfterPostProcess is now static
JulienIgnace-Unity Nov 27, 2019
53e4a0e
Merge branch 'HDRP/staging' of https://github.com/Unity-Technologies/…
JulienIgnace-Unity Nov 27, 2019
5b13043
Merge branch 'HDRP/rendergraph-update' of https://github.com/Unity-Te…
JulienIgnace-Unity Nov 27, 2019
0e7152c
Add AfterPostProcess to RenderGraph (WIP)
JulienIgnace-Unity Nov 27, 2019
f81dd5b
AfterPostProcess implementation
JulienIgnace-Unity Nov 28, 2019
d36bccf
Fixed wrong RTHandle allocation
JulienIgnace-Unity Nov 28, 2019
dd614e6
Fixed light layers texture binding during deferred lighting pass
JulienIgnace-Unity Nov 28, 2019
7bcda45
Implemented Post Process Final Pass with RenderGraph
JulienIgnace-Unity Nov 28, 2019
ee57823
Merge branch 'HDRP/staging' of https://github.com/Unity-Technologies/…
JulienIgnace-Unity Feb 3, 2020
9b45bac
Post merge fixes
JulienIgnace-Unity Feb 10, 2020
6676461
Fixed some issues with missing buffers in SSS and deferred lighting c…
JulienIgnace-Unity Feb 11, 2020
5c7becf
Merge branch 'HDRP/staging' of https://github.com/Unity-Technologies/…
JulienIgnace-Unity Feb 11, 2020
40d7d37
Fixed alpha in post processes
JulienIgnace-Unity Feb 11, 2020
3fc77fa
Removed RenderGraphResource and RenderGraphMutableResource in favor o…
JulienIgnace-Unity Feb 13, 2020
b2de439
Merge branch 'HDRP/staging' of https://github.com/Unity-Technologies/…
JulienIgnace-Unity Feb 24, 2020
9f1d7c3
Merge branch 'HDRP/rendergraph-postprocess' of https://github.com/Uni…
JulienIgnace-Unity Feb 25, 2020
d5696ff
Fixed decal normal patch pass
JulienIgnace-Unity Feb 25, 2020
6a15b4b
Fixed stencil resolve render pass
JulienIgnace-Unity Feb 25, 2020
45ce8c0
Fixed RenderDBuffer render pass function capturing variables.
JulienIgnace-Unity Feb 25, 2020
346618c
Fixed wrong variable capture and restored ClearLightList to the rende…
JulienIgnace-Unity Feb 25, 2020
34240cd
Merge branch 'HDRP/staging' of https://github.com/Unity-Technologies/…
JulienIgnace-Unity Feb 27, 2020
e7461e6
Various fixes of things that diverged compared to regular path.
JulienIgnace-Unity Mar 3, 2020
639ac4b
Merge branch 'HDRP/staging' of https://github.com/Unity-Technologies/…
JulienIgnace-Unity Mar 3, 2020
54171b8
Merge branch 'HDRP/rendergraph-postprocess' of https://github.com/Uni…
JulienIgnace-Unity Mar 3, 2020
9960b20
Unified renderer list and texture invalid handle error.
JulienIgnace-Unity Mar 3, 2020
ea729c3
Revert wrong change
JulienIgnace-Unity Mar 4, 2020
afa9870
Added constant buffer hlsl generation
JulienIgnace-Unity Mar 4, 2020
7410584
Changed UnityGlobal constant buffers to ShaderVariablesGlobals and ge…
JulienIgnace-Unity Mar 4, 2020
238b7ab
Merge branch 'HDRP/staging' of https://github.com/Unity-Technologies/…
JulienIgnace-Unity Mar 5, 2020
7129c81
post merge fix
JulienIgnace-Unity Mar 5, 2020
502b3a7
Removed useless comment.
JulienIgnace-Unity Mar 5, 2020
49fd96f
Missing doc
JulienIgnace-Unity Mar 5, 2020
33683f3
Merge branch 'HDRP/rendergraph-cleanup' of https://github.com/Unity-T…
JulienIgnace-Unity Mar 5, 2020
4aec3b9
Started moving cmd.SetGlobalXXX to update the global CB (WIP)
JulienIgnace-Unity Mar 5, 2020
8006917
Implemented Volumetrics global CB and various fixes.
JulienIgnace-Unity Mar 6, 2020
b88911c
Merge branch 'HDRP/staging' of https://github.com/Unity-Technologies/…
JulienIgnace-Unity Mar 6, 2020
8939e9f
Implemented shadow global CB update.
JulienIgnace-Unity Mar 6, 2020
ef1c880
Finished up Global Constant Buffer setup
JulienIgnace-Unity Mar 6, 2020
8f78984
Fix null ref
JulienIgnace-Unity Mar 6, 2020
e5f1e0a
Fixed global constant buffer alignment issues.
JulienIgnace-Unity Mar 9, 2020
3e83e64
Fixed shadows and SSS
JulienIgnace-Unity Mar 10, 2020
e30a677
Small ConstantBuffer API refacto
JulienIgnace-Unity Mar 10, 2020
770039e
Small fix
JulienIgnace-Unity Mar 10, 2020
7bfafa8
Volumetric Constant Buffer implementation + Fix
JulienIgnace-Unity Mar 10, 2020
d542112
Fix ambient occlusion
JulienIgnace-Unity Mar 10, 2020
89fe0b6
Merge branch 'HDRP/staging' of https://github.com/Unity-Technologies/…
JulienIgnace-Unity Mar 11, 2020
5a75d00
Removed redundant SetGlobalXXX
JulienIgnace-Unity Mar 11, 2020
5f79288
Light list build global CB implementation
JulienIgnace-Unity Mar 12, 2020
f6a8ab6
Fixed path tracing frame index constant
JulienIgnace-Unity Mar 13, 2020
1a36c4c
Fixed ao constant w/ raytracing
JulienIgnace-Unity Mar 13, 2020
6bbeaa1
Better path tracing fix.
JulienIgnace-Unity Mar 13, 2020
3d427b8
Merge branch 'HDRP/staging' of https://github.com/Unity-Technologies/…
JulienIgnace-Unity Mar 13, 2020
11fd3d4
Merge branch 'HDRP/staging' of https://github.com/Unity-Technologies/…
JulienIgnace-Unity Mar 19, 2020
75c2096
Refactored CB API to comply with Render Graph specificities
JulienIgnace-Unity Mar 19, 2020
c7d1732
Merge branch 'HDRP/staging' of https://github.com/Unity-Technologies/…
JulienIgnace-Unity Mar 20, 2020
1a00f9a
Update test screenshot
JulienIgnace-Unity Mar 20, 2020
235415e
Fixed constant buffer generation to use macros.
JulienIgnace-Unity Mar 20, 2020
e963cd7
Merge branch 'HDRP/staging' of https://github.com/Unity-Technologies/…
JulienIgnace-Unity Mar 23, 2020
21600ed
Fixed color/depth pyramid debug
JulienIgnace-Unity Mar 23, 2020
5535110
Cleanup
JulienIgnace-Unity Mar 23, 2020
9887cf5
Merge branch 'HDRP/staging' of https://github.com/Unity-Technologies/…
JulienIgnace-Unity Mar 24, 2020
8cf7863
Small fix
JulienIgnace-Unity Mar 24, 2020
736b03a
Merge branch 'HDRP/staging' of https://github.com/Unity-Technologies/…
JulienIgnace-Unity Mar 24, 2020
6b6e588
Post merge fix
JulienIgnace-Unity Mar 24, 2020
33f3c72
Added global constant buffer hlsl generation.
JulienIgnace-Unity Mar 25, 2020
eac25c5
Merge branch 'HDRP/staging' of https://github.com/Unity-Technologies/…
JulienIgnace-Unity Mar 26, 2020
fdca802
Post merge fix
JulienIgnace-Unity Mar 26, 2020
5c14fdd
Merge branch 'HDRP/staging' of https://github.com/Unity-Technologies/…
JulienIgnace-Unity Apr 2, 2020
bca3833
Post merge fix
JulienIgnace-Unity Apr 2, 2020
3b10157
Post merge fix 2
JulienIgnace-Unity Apr 2, 2020
6cf20d8
Double inclusion fix.
JulienIgnace-Unity Apr 2, 2020
dfb7015
Fixed CB visibility
JulienIgnace-Unity Apr 3, 2020
0f14fe9
Indentation fix
JulienIgnace-Unity Apr 3, 2020
1c0fae5
Removed temporary comments.
JulienIgnace-Unity Apr 3, 2020
56200ca
Moved some constants around.
JulienIgnace-Unity Apr 3, 2020
277ee40
Merge branch 'HDRP/staging' of https://github.com/Unity-Technologies/…
JulienIgnace-Unity Apr 6, 2020
195eefb
Merge branch 'HDRP/staging' of https://github.com/Unity-Technologies/…
JulienIgnace-Unity Apr 6, 2020
98d7b06
Post merge fix + Port ProbeVolume global variables to constant buffers.
JulienIgnace-Unity Apr 6, 2020
7852ca9
Fixed deallocation of constant buffers
JulienIgnace-Unity Apr 7, 2020
8fcb2cc
Properly release Volumetric constant buffers.
JulienIgnace-Unity Apr 7, 2020
f47fcfc
Another update to CB API
JulienIgnace-Unity Apr 8, 2020
bdc853f
Updated documentation.
JulienIgnace-Unity Apr 8, 2020
ff4557a
Merge branch 'HDRP/staging' of https://github.com/Unity-Technologies/…
JulienIgnace-Unity Apr 8, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,15 @@ public string EmitTypeDecl()

shaderText += "// Generated from " + type.FullName + "\n";
shaderText += "// PackingRules = " + attr.packingRules.ToString() + "\n";
if (!attr.omitStructDeclaration)

if (attr.generateCBuffer)
{
if (attr.constantRegister != -1)
shaderText += "GLOBAL_CBUFFER_START(" + type.Name + ", b" + attr.constantRegister + ")\n";
else
shaderText += "CBUFFER_START(" + type.Name + ")\n";
}
else if (!attr.omitStructDeclaration)
{
shaderText += "struct " + type.Name + "\n";
shaderText += "{\n";
Expand All @@ -418,7 +426,11 @@ public string EmitTypeDecl()
shaderText += " " + shaderFieldInfo.ToString() + "\n";
}

if (!attr.omitStructDeclaration)
if (attr.generateCBuffer)
{
shaderText += "CBUFFER_END\n";
}
else if (!attr.omitStructDeclaration)
{
shaderText += "};\n";
}
Expand Down Expand Up @@ -764,6 +776,10 @@ private string EmitPackedGetters()
{
funcSignature = "float4 " + funcSignature;
}
else if (packedInfo.fieldType == typeof(Vector2Int))
{
funcSignature = "int2 " + funcSignature;
}
funcBody += "return (" + sourceName + "." + packedInfo.fieldName + ");";
break;
default:
Expand Down Expand Up @@ -850,6 +866,10 @@ private string EmitPackedSetters()
{
funcSignature += "float4 " + newParamName + ", inout " + type.Name + " " + sourceName + ")";
}
else if (packedInfo.fieldType == typeof(Vector2Int))
{
funcSignature += "int2 " + newParamName + ", inout " + type.Name + " " + sourceName + ")";
}
funcBody += sourceName + "." + packedInfo.fieldName + " = " + newParamName + ";";
break;
default:
Expand Down Expand Up @@ -939,6 +959,10 @@ private string EmitPackedInit()
{
funcSignature += "float4 " + newParamName + ", inout " + type.Name + " " + sourceName + ")";
}
else if (packedInfo.fieldType == typeof(Vector2Int))
{
funcSignature += "int2 " + newParamName + ", inout " + type.Name + " " + sourceName + ")";
}
funcBody += sourceName + "." + packedInfo.fieldName + " = " + newParamName + ";";
break;
default:
Expand Down Expand Up @@ -1015,6 +1039,16 @@ public bool Generate()
var arrayInfos = (field.GetCustomAttributes(typeof(HLSLArray), false) as HLSLArray[]);
if (arrayInfos.Length != 0)
{
// For constant buffers, every element of the array needs to be aligned to a Vector4
if (attr.generateCBuffer &&
arrayInfos[0].elementType != typeof(Vector4) &&
arrayInfos[0].elementType != typeof(ShaderGenUInt4) &&
arrayInfos[0].elementType != typeof(Matrix4x4))
{
Error("Invalid HLSLArray target: '" + field.FieldType + "'" + ", only Vector4, Matrix4x4 and ShaderGenUInt4 are supported for arrays in constant buffers.");
return false;
}

arraySize = arrayInfos[0].arraySize;
fieldType = arrayInfos[0].elementType;
}
Expand Down Expand Up @@ -1171,6 +1205,10 @@ public bool Generate()
EmitPrimitiveType(floatPrecision, 3, arraySize, field.Name, "", m_ShaderFields);
else if (fieldType == typeof(Vector4))
EmitPrimitiveType(floatPrecision, 4, arraySize, field.Name, "", m_ShaderFields);
else if (fieldType == typeof(Vector2Int))
EmitPrimitiveType(PrimitiveType.Int, 2, arraySize, field.Name, "", m_ShaderFields);
else if (fieldType == typeof(ShaderGenUInt4))
EmitPrimitiveType(PrimitiveType.UInt, 4, arraySize, field.Name, "", m_ShaderFields);
else if (fieldType == typeof(Matrix4x4))
EmitMatrixType(floatPrecision, 4, 4, arraySize, field.Name, "", m_ShaderFields);
else if (!ExtractComplex(field, m_ShaderFields))
Expand Down
191 changes: 191 additions & 0 deletions com.unity.render-pipelines.core/Runtime/Common/ConstantBuffer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
using System.Collections.Generic;
using Unity.Collections.LowLevel.Unsafe;

namespace UnityEngine.Rendering
{
/// <summary>
/// Constant Buffer management class.
/// </summary>
public class ConstantBuffer
{
static List<ConstantBufferBase> m_RegisteredConstantBuffers = new List<ConstantBufferBase>();

/// <summary>
/// Update the GPU data of the constant buffer and bind it globally.
/// </summary>
/// <typeparam name="CBType">The type of structure representing the constant buffer data.</typeparam>
/// <param name="cmd">Command Buffer used to execute the graphic commands.</param>
/// <param name="data">Input data of the constant buffer.</param>
/// <param name="shaderId">Shader porperty id to bind the constant buffer to.</param>
public static void PushGlobal<CBType>(CommandBuffer cmd, in CBType data, int shaderId) where CBType : struct
{
var cb = TypedConstantBuffer<CBType>.instance;

cb.UpdateData(cmd, data);
cb.SetGlobal(cmd, shaderId);
}

/// <summary>
/// Update the GPU data of the constant buffer and bind it to a compute shader.
/// </summary>
/// <typeparam name="CBType">The type of structure representing the constant buffer data.</typeparam>
/// <param name="cmd">Command Buffer used to execute the graphic commands.</param>
/// <param name="data">Input data of the constant buffer.</param>
/// <param name="cs">Compute shader to which the constant buffer should be bound.</param>
/// <param name="shaderId">Shader porperty id to bind the constant buffer to.</param>
public static void Push<CBType>(CommandBuffer cmd, in CBType data, ComputeShader cs, int shaderId) where CBType : struct
{
var cb = TypedConstantBuffer<CBType>.instance;

cb.UpdateData(cmd, data);
cb.Set(cmd, cs, shaderId);
}

/// <summary>
/// Update the GPU data of the constant buffer and bind it to a material.
/// </summary>
/// <typeparam name="CBType">The type of structure representing the constant buffer data.</typeparam>
/// <param name="cmd">Command Buffer used to execute the graphic commands.</param>
/// <param name="data">Input data of the constant buffer.</param>
/// <param name="mat">Material to which the constant buffer should be bound.</param>
/// <param name="shaderId">Shader porperty id to bind the constant buffer to.</param>
public static void Push<CBType>(CommandBuffer cmd, in CBType data, Material mat, int shaderId) where CBType : struct
{
var cb = TypedConstantBuffer<CBType>.instance;

cb.UpdateData(cmd, data);
cb.Set(mat, shaderId);
}

/// <summary>
/// Update the GPU data of the constant buffer.
/// </summary>
/// <typeparam name="CBType">The type of structure representing the constant buffer data.</typeparam>
/// <param name="cmd">Command Buffer used to execute the graphic commands.</param>
/// <param name="data">Input data of the constant buffer.</param>
public static void UpdateData<CBType>(CommandBuffer cmd, in CBType data) where CBType : struct
{
var cb = TypedConstantBuffer<CBType>.instance;

cb.UpdateData(cmd, data);
}

/// <summary>
/// Bind the constant buffer globally.
/// </summary>
/// <typeparam name="CBType">The type of structure representing the constant buffer data.</typeparam>
/// <param name="cmd">Command Buffer used to execute the graphic commands.</param>
/// <param name="shaderId">Shader porperty id to bind the constant buffer to.</param>
public static void SetGlobal<CBType>(CommandBuffer cmd, int shaderId) where CBType : struct
{
var cb = TypedConstantBuffer<CBType>.instance;

cb.SetGlobal(cmd, shaderId);
}

/// <summary>
/// Bind the constant buffer to a compute shader.
/// </summary>
/// <typeparam name="CBType">The type of structure representing the constant buffer data.</typeparam>
/// <param name="cmd">Command Buffer used to execute the graphic commands.</param>
/// <param name="cs">Compute shader to which the constant buffer should be bound.</param>
/// <param name="shaderId">Shader porperty id to bind the constant buffer to.</param>
public static void Set<CBType>(CommandBuffer cmd, ComputeShader cs, int shaderId) where CBType : struct
{
var cb = TypedConstantBuffer<CBType>.instance;

cb.Set(cmd, cs, shaderId);
}

/// <summary>
/// Bind the constant buffer to a material.
/// </summary>
/// <typeparam name="CBType">The type of structure representing the constant buffer data.</typeparam>
/// <param name="mat">Material to which the constant buffer should be bound.</param>
/// <param name="shaderId">Shader porperty id to bind the constant buffer to.</param>
public static void Set<CBType>(Material mat, int shaderId) where CBType : struct
{
var cb = TypedConstantBuffer<CBType>.instance;

cb.Set(mat, shaderId);
}

/// <summary>
/// Release all currently allocated constant buffers.
/// This needs to be called before shutting down the application.
/// </summary>
public static void ReleaseAll()
{
foreach (var cb in m_RegisteredConstantBuffers)
cb.Release();

m_RegisteredConstantBuffers.Clear();
}

internal abstract class ConstantBufferBase
{
public abstract void Release();
}

internal static void Register(ConstantBufferBase cb)
{
m_RegisteredConstantBuffers.Add(cb);
}

class TypedConstantBuffer<CBType> : ConstantBufferBase where CBType : struct
{
CBType[] m_Data = new CBType[1]; // Array is required by the ComputeBuffer SetData API
static TypedConstantBuffer<CBType> s_Instance = null;
internal static TypedConstantBuffer<CBType> instance
{
get
{
if (s_Instance == null)
s_Instance = new TypedConstantBuffer<CBType>();
return s_Instance;
}
set
{
s_Instance = value;
}
}
ComputeBuffer m_GPUConstantBuffer = null;

TypedConstantBuffer()
{
m_GPUConstantBuffer = new ComputeBuffer(1, UnsafeUtility.SizeOf<CBType>(), ComputeBufferType.Constant);
ConstantBuffer.Register(this);
}

public void UpdateData(CommandBuffer cmd, in CBType data)
{
m_Data[0] = data;
cmd.SetComputeBufferData(m_GPUConstantBuffer, m_Data);
}

public void SetGlobal(CommandBuffer cmd, int shaderId)
{
cmd.SetGlobalConstantBuffer(m_GPUConstantBuffer, shaderId, 0, m_GPUConstantBuffer.stride);
}

public void Set(CommandBuffer cmd, ComputeShader cs, int shaderId)
{
cmd.SetComputeConstantBufferParam(cs, shaderId, m_GPUConstantBuffer, 0, m_GPUConstantBuffer.stride);
}

public void Set(Material mat, int shaderId)
{
// This isn't done via command buffer because as long as the buffer itself is not destroyed,
// the binding stays valid. Only the commit of data needs to go through the command buffer.
// We do it here anyway for now to simplify user API.
mat.SetConstantBuffer(shaderId, m_GPUConstantBuffer, 0, m_GPUConstantBuffer.stride);
}

public override void Release()
{
CoreUtils.SafeRelease(m_GPUConstantBuffer);
s_Instance = null;
}
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ public class GenerateHLSL : System.Attribute
/// Generate structure declaration or not.
/// </summary>
public bool omitStructDeclaration;
/// <summary>
/// Generate constant buffer declaration or not.
/// </summary>
public bool generateCBuffer;
/// <summary>
/// If specified, when generating a constant buffer, use this explicit register.
/// </summary>
public int constantRegister;

/// <summary>
/// GenerateHLSL attribute constructor.
Expand All @@ -105,7 +113,10 @@ public class GenerateHLSL : System.Attribute
/// <param name="paramDefinesStart">Start value of debug defines.</param>
/// <param name="omitStructDeclaration">Omit structure declaration.</param>
/// <param name="containsPackedFields">Contains packed fields.</param>
public GenerateHLSL(PackingRules rules = PackingRules.Exact, bool needAccessors = true, bool needSetters = false, bool needParamDebug = false, int paramDefinesStart = 1, bool omitStructDeclaration = false, bool containsPackedFields = false)
/// <param name="generateCBuffer">Generate a constant buffer.</param>
/// <param name="constantRegister">When generating a constant buffer, specify the optional constant register.</param>
public GenerateHLSL(PackingRules rules = PackingRules.Exact, bool needAccessors = true, bool needSetters = false, bool needParamDebug = false, int paramDefinesStart = 1,
bool omitStructDeclaration = false, bool containsPackedFields = false, bool generateCBuffer = false, int constantRegister = -1)
{
packingRules = rules;
this.needAccessors = needAccessors;
Expand All @@ -114,6 +125,8 @@ public GenerateHLSL(PackingRules rules = PackingRules.Exact, bool needAccessors
this.paramDefinesStart = paramDefinesStart;
this.omitStructDeclaration = omitStructDeclaration;
this.containsPackedFields = containsPackedFields;
this.generateCBuffer = generateCBuffer;
this.constantRegister = constantRegister;
}
}

Expand Down Expand Up @@ -183,7 +196,7 @@ public class HLSLArray : System.Attribute
/// <summary>
/// Size of the array.
/// </summary>
public int arraySize;
public int arraySize;
/// <summary>
/// Type of the array elements.
/// </summary>
Expand Down Expand Up @@ -282,5 +295,11 @@ public PackingAttribute(string displayName = "", FieldPacking packingScheme = Fi
}
}

/// <summary>
/// This type needs to be used when generating unsigned integer arrays for constant buffers.
/// </summary>
public struct ShaderGenUInt4
{

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,6 @@ void DrawAxfSurfaceOptionsGUI()
BRDFVariants |= ((uint)wardVariant) << 2;
BRDFVariants |= ((uint)blinnVariant) << 4;

// cmd.SetGlobalFloat( HDShaderIDs._TexturingModeFlags, *(float*) &texturingModeFlags );
m_SVBRDF_BRDFType.floatValue = (float)BRDFType;
m_SVBRDF_BRDFVariants.floatValue = (float)BRDFVariants;

Expand Down Expand Up @@ -488,8 +487,6 @@ void DrawAxfSurfaceOptionsGUI()
clearcoatRefraction = EditorGUILayout.Toggle("Enable Refraction", clearcoatRefraction);
}

// cmd.SetGlobalFloat( HDShaderIDs._TexturingModeFlags, *(float*) &texturingModeFlags );

--EditorGUI.indentLevel;
break;
}
Expand Down
Loading