public static void Initialize() { if (!initialized) { // 設定値を利用するため、LazyInitとする RenderQueue = new ShaderPropFloat(PropKey._SetManualRenderQueue, EditRange.renderQueue, new float[] { 0, 5000f, }, PRESET_PM, 3000, 2000, 3000); Shininess = new ShaderPropFloat(PropKey._Shininess, EditRange.shininess, settings.shininessRange(), PRESET_RATIO, 0, 0, 0.1f, 0.5f, 1, 5); OutlineWidth = new ShaderPropFloat(PropKey._OutlineWidth, EditRange.outlineWidth, settings.outlineWidthRange(), null, 0.0001f, 0.0001f, 0.001f, 0.002f); RimPower = new ShaderPropFloat(PropKey._RimPower, EditRange.rimPower, settings.rimPowerRange(), PRESET_INV, 0f, 0f, 25f, 50f, 100f); RimShift = new ShaderPropFloat(PropKey._RimShift, EditRange.rimShift, settings.rimShiftRange(), PRESET_RATIO, 0f, 0f, 0.25f, 0.5f, 1f); HiRate = new ShaderPropFloat(PropKey._HiRate, EditRange.hiRate, settings.hiRateRange(), PRESET_RATIO, 0f, 0f, 0.5f, 1.0f); HiPow = new ShaderPropFloat(PropKey._HiPow, EditRange.hiPow, settings.hiPowRange(), PRESET_RATIO, 0.001f, 0.001f, 1f, 50f); FloatValue1 = new ShaderPropFloat(PropKey._FloatValue1, EditRange.floatVal1, settings.hiPowRange(), null, 10f, 0f, 100f, 200f); FloatValue2 = new ShaderPropFloat(PropKey._FloatValue2, EditRange.floatVal2, settings.hiPowRange(), PRESET_INV, 1f, -15, 0f, 1f, 15f); FloatValue3 = new ShaderPropFloat(PropKey._FloatValue3, EditRange.floatVal3, settings.hiPowRange(), PRESET_RATIO, 1f, 0f, 0.5f, 1f); Parallax = new ShaderPropFloat(PropKey._Parallax, "F4", new float[] { 0.005f, 0.08f, 0.001f, 0.1f }, PRESET_RATIO, 0.02f, 0.02f); Cutoff = new ShaderPropFloat(PropKey._Cutoff, "F3", new float[] { 0f, 1f, 0f, 1f }, PRESET_RATIO, 0f, 0f, 0.5f, 1f); EmissionLM = new ShaderPropBool(PropKey._EmissionLM); UseMulticolTex = new ShaderPropBool(PropKey._UseMulticolTex); Strength = new ShaderPropFloat(PropKey._Strength, "F2", new float[] { 0f, 1f, 0f, 1f }, PRESET_RATIO, 0.2f, 0.2f); StencilComp = new ShaderPropFloat(PropKey._StencilComp, "F0", new float[] { 0f, 255f, 0f, 255f }, PRESET_RATIO, 8f, 8f); Stencil = new ShaderPropFloat(PropKey._Stencil, "F0", new float[] { 0f, 255f, 0f, 255f }, PRESET_RATIO, 0f, 0f); StencilOp = new ShaderPropFloat(PropKey._StencilOp, "F0", new float[] { 0f, 255f, 0f, 255f }, PRESET_RATIO, 0f, 0f); StencilWriteMask = new ShaderPropFloat(PropKey._StencilWriteMask, "F0", new float[] { 0f, 255f, 0f, 255f }, PRESET_RATIO, 255f, 255f); StencilReadMask = new ShaderPropFloat(PropKey._StencilReadMask, "F0", new float[] { 0f, 255f, 0f, 255f }, PRESET_RATIO, 255f, 255f); ColorMask = new ShaderPropFloat(PropKey._ColorMask, "F0", new float[] { 0f, 255f, 0f, 255f }, PRESET_RATIO, 255f, 255f); EnvAlpha = new ShaderPropFloat(PropKey._EnvAlpha, "F1", new float[] { 0f, 1f, 0f, 1f }, PRESET_RATIO, 0f, 0f); EnvAdd = new ShaderPropFloat(PropKey._EnvAdd, "F1", new float[] { 1f, 2f, 1f, 2f }, PRESET_RATIO, 1f, 1f); initialized = true; } }
public static void Initialize() { if (!initialized) { // 設定値を利用するため、LazyInitとする RenderQueue = new ShaderPropFloat(PropKey._SetManualRenderQueue, EditRange.renderQueue, new float[]{0, 5000f,}, null, 3000, 3000, 3100, 3200, 3300); Shininess = new ShaderPropFloat(PropKey._Shininess, EditRange.shininess, settings.shininessRange(), FLAG_RATIO, 0, 0, 0.1f, 0.5f, 1, 5); OutlineWidth = new ShaderPropFloat(PropKey._OutlineWidth, EditRange.outlineWidth, settings.outlineWidthRange(), null, 0.0001f, 0.0001f, 0.001f, 0.002f); RimPower = new ShaderPropFloat(PropKey._RimPower, EditRange.rimPower, settings.rimPowerRange(), FLAG_INV, 0f, 0f, 25f, 50f, 100f); RimShift = new ShaderPropFloat(PropKey._RimShift, EditRange.rimShift, settings.rimShiftRange(), FLAG_RATIO, 0f, 0f, 0.25f, 0.5f, 1f); HiRate = new ShaderPropFloat(PropKey._HiRate, EditRange.hiRate, settings.hiRateRange(), FLAG_RATIO, 0f, 0f, 0.5f, 1.0f); HiPow = new ShaderPropFloat(PropKey._HiPow, EditRange.hiPow, settings.hiPowRange(), FLAG_RATIO, 0.001f, 0.001f, 1f, 50f); FloatValue1 = new ShaderPropFloat(PropKey._FloatValue1, EditRange.floatVal1, settings.hiPowRange(), null, 10f, 0f, 100f, 200f); FloatValue2 = new ShaderPropFloat(PropKey._FloatValue2, EditRange.floatVal2, settings.hiPowRange(), FLAG_INV, 1f, -15, 0f, 1f, 15f); FloatValue3 = new ShaderPropFloat(PropKey._FloatValue3, EditRange.floatVal3, settings.hiPowRange(), FLAG_RATIO, 1f, 0f, 0.5f, 1f); Parallax = new ShaderPropFloat(PropKey._Parallax, "F4", new float[] {0.005f, 0.08f, 0.001f, 0.1f}, FLAG_RATIO, 0.02f, 0.02f); Cutoff = new ShaderPropFloat(PropKey._Cutoff, "F3", new float[] {0f, 1f, 0f, 1f}, FLAG_RATIO, 0.5f, 0.5f); EmissionLM = new ShaderPropBool(PropKey._EmissionLM); UseMulticolTex = new ShaderPropBool(PropKey._UseMulticolTex); Strength = new ShaderPropFloat(PropKey._Strength, "F2", new float[] {0f, 1f, 0f, 1f}, FLAG_RATIO, 0.2f, 0.2f); StencilComp = new ShaderPropFloat(PropKey._StencilComp, "F0", new float[] {0f, 255f, 0f, 255f}, FLAG_RATIO, 8f, 8f); Stencil = new ShaderPropFloat(PropKey._Stencil, "F0", new float[] {0f, 255f, 0f, 255f}, FLAG_RATIO, 0f, 0f); StencilOp = new ShaderPropFloat(PropKey._StencilOp, "F0", new float[] {0f, 255f, 0f, 255f}, FLAG_RATIO, 0f, 0f); StencilWriteMask = new ShaderPropFloat(PropKey._StencilWriteMask, "F0", new float[] {0f, 255f, 0f, 255f}, FLAG_RATIO, 255f, 255f); StencilReadMask = new ShaderPropFloat(PropKey._StencilReadMask, "F0", new float[] {0f, 255f, 0f, 255f}, FLAG_RATIO, 255f, 255f); ColorMask = new ShaderPropFloat(PropKey._ColorMask, "F0", new float[] {0f, 255f, 0f, 255f}, FLAG_RATIO, 255f, 255f); EnvAlpha = new ShaderPropFloat(PropKey._EnvAlpha, "F1", new float[] {0f, 1f, 0f, 1f}, FLAG_RATIO, 0f, 0f); EnvAdd = new ShaderPropFloat(PropKey._EnvAdd, "F1", new float[] {1f, 2f, 1f, 2f}, FLAG_RATIO, 1f, 1f); initialized = true; } }
public static void Initialize() { if (_initialized) { return; } // 設定値を利用するため、LazyInitとする RenderQueue = new ShaderPropFloat(PropKey._SetManualRenderQueue, EditRange.renderQueue, new[] { 0, 5000f, }, PRESET_PM, 3000, 2000, 3000); Shininess = new ShaderPropFloat(PropKey._Shininess, EditRange.shininess, settings.shininessRange(), PRESET_RATIO, 0, 0, 0.1f, 0.5f, 1, 5); OutlineWidth = new ShaderPropFloat(PropKey._OutlineWidth, EditRange.outlineWidth, settings.outlineWidthRange(), null, 0.0001f, 0.0001f, 0.001f, 0.002f); RimPower = new ShaderPropFloat(PropKey._RimPower, EditRange.rimPower, settings.rimPowerRange(), PRESET_INV, 0f, 0f, 25f, 50f, 100f); RimShift = new ShaderPropFloat(PropKey._RimShift, EditRange.rimShift, settings.rimShiftRange(), PRESET_RATIO, 0f, 0f, 0.25f, 0.5f, 1f); HiRate = new ShaderPropFloat(PropKey._HiRate, EditRange.hiRate, settings.hiRateRange(), PRESET_RATIO, 0f, 0f, 0.5f, 1.0f); HiPow = new ShaderPropFloat(PropKey._HiPow, EditRange.hiPow, settings.hiPowRange(), PRESET_RATIO, 0.001f, 0.001f, 1f, 50f); FloatValue1 = new ShaderPropFloat(PropKey._FloatValue1, EditRange.floatVal1, settings.hiPowRange(), null, 10f, 0f, 100f, 200f); FloatValue2 = new ShaderPropFloat(PropKey._FloatValue2, EditRange.floatVal2, settings.hiPowRange(), PRESET_INV, 1f, -15, 0f, 1f, 15f); FloatValue3 = new ShaderPropFloat(PropKey._FloatValue3, EditRange.floatVal3, settings.hiPowRange(), PRESET_RATIO, 1f, 0f, 0.5f, 1f); Parallax = new ShaderPropFloat(PropKey._Parallax, "F3", new[] { 0.005f, 0.08f, 0.001f, 0.1f }, PRESET_RATIO, 0.02f, 0.02f); Cutoff = new ShaderPropFloat(PropKey._Cutoff, "F3", new[] { 0f, 1f, 0f, 1f }, PRESET_RATIO, 0.5f, 0f, 0.5f, 1f); Cutout = new ShaderPropFloat(PropKey._Cutout, "F3", new[] { 0f, 1f, 0f, 1f }, PRESET_RATIO, 0.5f, 0f, 0.5f, 1f); EmissionLM = new ShaderPropBool(PropKey._EmissionLM); UseMulticolTex = new ShaderPropBool(PropKey._UseMulticolTex); ZTest = new ShaderPropEnum(PropKey._ZTest, typeof(CompareFunction), 4, 0, 8); ZTest2 = new ShaderPropBool(PropKey._ZTest2); ZTest2Alpha = new ShaderPropFloat(PropKey._ZTest2Alpha, "F3", new[] { 0f, 1f, 0f, 1f }, PRESET_RATIO, 0.8f, 0f, 0.8f, 1f); Strength = new ShaderPropFloat(PropKey._Strength, "F2", new[] { 0f, 1f, 0f, 1f }, PRESET_RATIO, 0.2f, 0.2f); StencilComp = new ShaderPropFloat(PropKey._StencilComp, "F0", new[] { 0f, 255f, 0f, 255f }, PRESET_RATIO, 8f, 8f); Stencil = new ShaderPropFloat(PropKey._Stencil, "F0", new[] { 0f, 255f, 0f, 255f }, PRESET_RATIO, 0f, 0f); StencilOp = new ShaderPropFloat(PropKey._StencilOp, "F0", new[] { 0f, 255f, 0f, 255f }, PRESET_RATIO, 0f, 0f); StencilWriteMask = new ShaderPropFloat(PropKey._StencilWriteMask, "F0", new[] { 0f, 255f, 0f, 255f }, PRESET_RATIO, 255f, 255f); StencilReadMask = new ShaderPropFloat(PropKey._StencilReadMask, "F0", new[] { 0f, 255f, 0f, 255f }, PRESET_RATIO, 255f, 255f); ColorMask = new ShaderPropFloat(PropKey._ColorMask, "F0", new[] { 0f, 255f, 0f, 255f }, PRESET_RATIO, 255f, 255f); EnvAlpha = new ShaderPropFloat(PropKey._EnvAlpha, "F1", new[] { 0f, 1f, 0f, 1f }, PRESET_RATIO, 0f, 0f); EnvAdd = new ShaderPropFloat(PropKey._EnvAdd, "F1", new[] { 1f, 2f, 1f, 2f }, PRESET_RATIO, 1f, 1f); Glossiness = new ShaderPropFloat(PropKey._Glossiness, "F3", new[] { 0f, 1f, 0f, 1f }, PRESET_RATIO, 0.5f, 0f, 0.5f, 1f); GlossMapScale = new ShaderPropFloat(PropKey._GlossMapScale, "F3", new[] { 0f, 1f, 0f, 1f }, PRESET_RATIO, 1f, 0f, 0.5f, 1f); SmoothnessTexChannel = new ShaderPropEnum(PropKey._SmoothnessTextureChannel, new[] { "Metallic Alpha", "Albedo Alpha" }, 0, 0, 1); EmissionScaleUI = new ShaderPropFloat(PropKey._EmissionScaleUI, "F3", new[] { 0f, 1f, 0f, 1f }, PRESET_RATIO, 0f, 0f, 0.5f, 1f); Metallic = new ShaderPropFloat(PropKey._Metallic, "F3", new[] { 0f, 1f, 0f, 1f }, PRESET_RATIO, 0f, 0f, 0.5f, 1f); BumpScale = new ShaderPropFloat(PropKey._BumpScale, "F3", new[] { 0.1f, 10f, 0.01f, 100f }, PRESET_RATIO, 1f, 0.1f, 1f, 10f); OcclusionStrength = new ShaderPropFloat(PropKey._OcclusionStrength, "F3", new[] { 0f, 1f, 0f, 1f }, PRESET_RATIO, 1f, 0f, 0.5f, 1f); DetailNormalMapScale = new ShaderPropFloat(PropKey._DetailNormalMapScale, "F3", new[] { 0.1f, 10f, 0.01f, 100f }, PRESET_RATIO, 1f, 0.1f, 1f, 10f); Mode = new ShaderPropFloat(PropKey._Mode, "F0", new[] { 0f, 4f, 0f, 4f }, PRESET_EMPTY, 0f, 4f); ZWrite = new ShaderPropFloat(PropKey._ZWrite, "F0", new[] { 0f, 1f, 0f, 1f }, PRESET_EMPTY, 0f, 1f); // UV Set for secondary textures UVSec = new ShaderPropEnum(PropKey._UVSec, new[] { "UV0", "UV1" }, 0, 0, 1); SrcBlend = new ShaderPropEnum(PropKey._SrcBlend, typeof(BlendMode), 0, 0, 1); DstBlend = new ShaderPropEnum(PropKey._DstBlend, typeof(BlendMode), 1, 0, 1); SpecularHeighlights = new ShaderPropBool(PropKey._SpecularHighlights); GlossyReflections = new ShaderPropBool(PropKey._GlossyReflections); _initialized = true; }