for AntTweakbar GUI controls I'm trying to find a way to bring all variables into neat sets of float3/4's.. for example I have now;
Code: Select all
float HueShiftD < string UIName="Day HSL: Hue Shift"; string UIWidget="Spinner"; float UIMin=0.0; float UIMax=1.0; float UIStep=0.001; > = {0.0};
float SaturationD < string UIName="Day HSL: Saturation"; string UIWidget="Spinner"; float UIMin=0.0; float UIMax=1.0; float UIStep=0.001; > = {0.0};
float LightnessD < string UIName="Day HSL: Highlights"; string UIWidget="Spinner"; float UIMin=0.0; float UIMax=1.0; float UIStep=0.001; > = {0.0};
float ShadowsD < string UIName="Day HSL: Shadows"; string UIWidget="Spinner"; float UIMin=0.0; float UIMax=1.0; float UIStep=0.001; > = {0.0};
Code: Select all
float4 HSL_D;
HSL_D.x < string UIName="Day HSL: Hue Shift"; string UIWidget="Spinner"; float UIMin=0.0; float UIMax=1.0; float UIStep=0.001; > = {0.0};
HSL_D.y < string UIName="Day HSL: Saturation"; string UIWidget="Spinner"; float UIMin=0.0; float UIMax=1.0; float UIStep=0.001; > = {0.0};
HSL_D.z < string UIName="Day HSL: Highlights"; string UIWidget="Spinner"; float UIMin=0.0; float UIMax=1.0; float UIStep=0.001; > = {0.0};
HSL_D.w < string UIName="Day HSL: Shadows"; string UIWidget="Spinner"; float UIMin=0.0; float UIMax=1.0; float UIStep=0.001; > = {0.0};
Is it only able to compile with GUI when you actually declare the variable? I remember seeing something online where people were using AntTweakbar on variables that were declared earlier, but for the life of me I can't find that page...
--- another question related to compilation
I'm having various if statements and ASM clearly shows both sides of the statement are evaluated and later compared. Now I tried using static (ie. static bool blabla) which works, but doesn't work in GUI. I can use [branch] if to kind of control the flow to some extend, but I wonder if there is a way through GUI to actually skip parts of the shader in compilation, similar to #define directives. I can't use the techniques section for this... So far my poor attempts have failed.
Edit: and I realized now I am in the wrong part of the forum posting this, sry.