From 2c0c0c496efd906ea811a90342ec779f007fa85b Mon Sep 17 00:00:00 2001 From: Joseph Cloutier Date: Thu, 4 Sep 2025 20:11:03 -0400 Subject: [PATCH] Add `ShaderRegisterData.custom`. --- away3d/materials/compilation/ShaderCompiler.hx | 2 ++ away3d/materials/compilation/ShaderRegisterData.hx | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/away3d/materials/compilation/ShaderCompiler.hx b/away3d/materials/compilation/ShaderCompiler.hx index 90578e21..3eeea264 100644 --- a/away3d/materials/compilation/ShaderCompiler.hx +++ b/away3d/materials/compilation/ShaderCompiler.hx @@ -310,6 +310,8 @@ class ShaderCompiler _vertexCode = ""; _fragmentCode = ""; + _sharedRegisters.custom = null; + _sharedRegisters.localPosition = _registerCache.getFreeVertexVectorTemp(); _registerCache.addVertexTempUsages(_sharedRegisters.localPosition, 1); diff --git a/away3d/materials/compilation/ShaderRegisterData.hx b/away3d/materials/compilation/ShaderRegisterData.hx index 3198c911..8241544d 100644 --- a/away3d/materials/compilation/ShaderRegisterData.hx +++ b/away3d/materials/compilation/ShaderRegisterData.hx @@ -123,6 +123,12 @@ class ShaderRegisterData */ public var bitangent:ShaderRegisterElement; + /** + * Space for named registers other than the ones above. Will be null until + * defined by an effect method. + */ + public var custom:Map = null; + public function new() {