public static void initialize() { SingletonCreator ts = new SingletonCreator("GFXStateBlockData", "FXAA_StateBlock : PFX_DefaultStateBlock"); ts["samplersDefined"] = true; ts["samplerStates[0]"] = "SamplerClampLinear"; ts.Create(); ts = new SingletonCreator("ShaderData", "FXAA_ShaderData"); ts["DXVertexShaderFile"] = "shaders/common/postFx/fxaa/fxaaV.hlsl"; ts["DXPixelShaderFile"] = "shaders/common/postFx/fxaa/fxaaP.hlsl"; ts["samplerNames[0]"] = "$colorTex"; ts["pixVersion"] = 3.0; ts.Create(); ts = new SingletonCreator("PostEffect", "FXAA_PostEffect", typeof(FXAA_PostEffect)); ts["isEnabled"] = false; ts["allowReflectPass"] = false; ts["renderTime"] = "PFXAfterDiffuse"; ts["texture[0]"] = "$backBuffer"; ts["target"] = "$backBuffer"; ts["stateBlock"] = "FXAA_StateBlock"; ts["shader"] = "FXAA_ShaderData"; ts.Create(); }
public static void initialize_CS() { ObjectCreator tch = new ObjectCreator("ShaderData", "AL_ShadowVisualizeShader"); tch["DXVertexShaderFile"] = "shaders/common/guiMaterialV.hlsl"; tch["DXPixelShaderFile"] = "shaders/common/lighting/advanced/dbgShadowVisualizeP.hlsl"; tch["OGLVertexShaderFile"] = "shaders/common/gl/guiMaterialV.glsl"; tch["OGLPixelShaderFile"] = "shaders/common/lighting/advanced/gl/dbgShadowVisualizeP.glsl"; tch["pixVersion"] = 2.0; tch.Create(); tch = new ObjectCreator("CustomMaterial", "AL_ShadowVisualizeMaterial"); tch["shader"] = "AL_ShadowVisualizeShader"; tch["stateBlock"] = "AL_DepthVisualizeState"; tch["sampler[\"shadowMap\"]"] = "#AL_ShadowVizTexture"; tch["sampler[\"depthViz\"]"] = "core/scripts/client/lighting/advanced/depthviz"; tch["pixVersion"] = 2.0; tch.Create(); SingletonCreator ts = new SingletonCreator("GuiControlProfile", "AL_ShadowLabelTextProfile"); ts["fontColor"] = "0 0 0"; ts["autoSizeWidth"] = true; ts["autoSizeHeight"] = true; ts["justify"] = "left"; ts["fontSize"] = 14; ts.Create(); }
public static void initialize() { SingletonCreator oc_Newobject00002; SingletonCreator oc_Newobject00001; if (true) { #region GuiControlProfile (NavEditorProfile) oc_Newobject00001 oc_Newobject00001 = new SingletonCreator("GuiControlProfile", "NavEditorProfile"); oc_Newobject00001["canKeyFocus"] = new Creator.StringNoQuote("true"); oc_Newobject00001["opaque"] = new Creator.StringNoQuote("true"); oc_Newobject00001["fillColor"] = "192 192 192 192"; oc_Newobject00001["category"] = "Editor"; #endregion oc_Newobject00001.Create(); #region GuiControlProfile (GuiSimpleBorderProfile) oc_Newobject00002 oc_Newobject00002 = new SingletonCreator("GuiControlProfile", "GuiSimpleBorderProfile"); oc_Newobject00002["opaque"] = new Creator.StringNoQuote("false"); oc_Newobject00002["border"] = new Creator.StringNoQuote("1"); oc_Newobject00002["category"] = "Editor"; #endregion oc_Newobject00002.Create(); } }
public static void initialize() { SingletonCreator ts = new SingletonCreator("ShaderData", "BL_ShadowFilterShaderV"); ts["DXVertexShaderFile"] = "shaders/common/lighting/basic/shadowFilterV.hlsl"; ts["DXPixelShaderFile"] = "shaders/common/lighting/basic/shadowFilterP.hlsl"; ts["OGLVertexShaderFile"] = "shaders/common/lighting/basic/gl/shadowFilterV.glsl"; ts["OGLPixelShaderFile"] = "shaders/common/lighting/basic/gl/shadowFilterP.glsl"; ts["samplerNames[0]"] = "$diffuseMap"; ts["defines"] = "BLUR_DIR=float2(1.0,0.0)"; ts["pixVersion"] = 2.0; ts.Create(); ts = new SingletonCreator("ShaderData", "BL_ShadowFilterShaderH : BL_ShadowFilterShaderV"); ts["defines"] = "BLUR_DIR=float2(0.0,1.0)"; ts.Create(); ts = new SingletonCreator("GFXStateBlockData", "BL_ShadowFilterSB : PFX_DefaultStateBlock"); ts["colorWriteDefined"] = true; ts["colorWriteRed"] = false; ts["colorWriteGreen"] = false; ts["colorWriteBlue"] = false; ts["blendDefined"] = true; ts["blendEnable"] = true; ts.Create(); BL_ShadowFilterPostEffect.initialize(); }
public static void initialize() { SingletonCreator ts = new SingletonCreator("ShaderData", "GammaShader"); ts["DXVertexShaderFile"] = "shaders/common/postFx/postFxV.hlsl"; ts["DXPixelShaderFile"] = "shaders/common/postFx/gammaP.hlsl"; ts["pixVersion"] = 2.0; ts.Create(); ts = new SingletonCreator("GFXStateBlockData", "GammaStateBlock : PFX_DefaultStateBlock"); ts["samplersDefined"] = true; ts["samplerStates[0]"] = "SamplerClampLinear"; ts["samplerStates[1]"] = "SamplerClampLinear"; ts.Create(); ts = new SingletonCreator("PostEffect", "GammaPostFX", typeof(GammaPostEffect)); ts["isEnabled"] = false; ts["allowReflectPass"] = false; ts["renderTime"] = "PFXBeforeBin"; ts["renderBin"] = "EditorBin"; ts["renderPriority"] = 9999; ts["shader"] = "GammaShader"; ts["stateBlock"] = "GammaStateBlock"; ts["texture[0]"] = "$backBuffer"; ts["texture[1]"] = '"' + mColorCorrectionFileName + '"'; // "$HDRPostFX::colorCorrectionRamp"; ts.Create(); }
public static void initialize() { SingletonCreator ts = new SingletonCreator("PostEffect", "UnderwaterFogPostFx", typeof(UnderwaterFogPostEffect)); ts["oneFrameOnly"] = true; ts["onThisFrame"] = false; // Let the fog effect render during the // reflection pass. ts["allowReflectPass"] = true; ts["renderTime"] = "PFXBeforeBin"; ts["renderBin"] = "ObjTranslucentBin"; ts["shader"] = "UnderwaterFogPassShader"; ts["stateBlock"] = "UnderwaterFogPassStateBlock"; ts["texture[0]"] = "#prepass"; ts["texture[1]"] = "$backBuffer"; ts["texture[2]"] = "#waterDepthGradMap"; // Needs to happen after the FogPostFx ts["renderPriority"] = 4; ts["isEnabled"] = false; ts.Create(); }
public static void initialize() { SingletonCreator ts = new SingletonCreator("ShaderData", "FogPassShader"); ts["DXVertexShaderFile"] = "shaders/common/postFx/postFxV.hlsl"; ts["DXPixelShaderFile"] = "shaders/common/postFx/fogP.hlsl"; // OGLVertexShaderFile = "shaders/common/postFx/gl//postFxV.glsl"; // OGLPixelShaderFile = "shaders/common/postFx/gl/fogP.glsl"; ts["samplerNames[0]"] = "$prepassTex"; ts["samplerNames[1]"] = "$backbuffer"; ts["pixVersion"] = 2.0; ts.Create(); ts = new SingletonCreator("GFXStateBlockData", "FogPassStateBlock : PFX_DefaultStateBlock"); ts["blendDefined"] = true; ts["blendEnable"] = true; ts["blendSrc"] = "GFXBlendSrcAlpha"; ts["blendDest"] = "GFXBlendInvSrcAlpha"; ts.Create(); ts = new SingletonCreator("PostEffect", "FogPostFx", typeof (FogPostEffect)); // We forward render the reflection pass // so it does its own fogging. ts["allowReflectPass"] = false; ts["renderTime"] = "PFXBeforeBin"; ts["renderBin"] = "ObjTranslucentBin"; ts["shader"] = "FogPassShader"; ts["stateBlock"] = "FogPassStateBlock"; ts["texture[0]"] = "#prepass"; ts["texture[1]"] = "$backBuffer"; ts["renderPriority"] = 5; ts["isEnabled"] = true; ts.Create(); ts = new SingletonCreator("ShaderData", "UnderwaterFogPassShader"); ts["DXVertexShaderFile"] = "shaders/common/postFx/postFxV.hlsl"; ts["DXPixelShaderFile"] = "shaders/common/postFx/underwaterFogP.hlsl"; // OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; // OGLPixelShaderFile = "shaders/common/postFx/gl/fogP.glsl"; ts["samplerNames[0]"] = "$prepassTex"; ts["samplerNames[1]"] = "$backbuffer"; ts["pixVersion"] = 2.0; ts.Create(); ts = new SingletonCreator("GFXStateBlockData", "UnderwaterFogPassStateBlock : PFX_DefaultStateBlock"); ts["samplersDefined"] = true; ts["samplerStates[0]"] = "SamplerClampPoint"; ts["samplerStates[1]"] = "SamplerClampPoint"; ts["samplerStates[2]"] = "SamplerClampLinear"; ts.Create(); }
public static void initialize_CS() { ObjectCreator tch = new ObjectCreator("ShaderData", "AL_ShadowVisualizeShader"); tch["DXVertexShaderFile"] = "shaders/common/guiMaterialV.hlsl"; tch["DXPixelShaderFile"] = "shaders/common/lighting/advanced/dbgShadowVisualizeP.hlsl"; tch["OGLVertexShaderFile"] = "shaders/common/gl/guiMaterialV.glsl"; tch["OGLPixelShaderFile"] = "shaders/common/lighting/advanced/gl/dbgShadowVisualizeP.glsl"; tch["pixVersion"] = 2.0; tch.Create(); tch = new ObjectCreator("CustomMaterial", "AL_ShadowVisualizeMaterial"); tch["shader"] = "AL_ShadowVisualizeShader"; tch["stateBlock"] = "AL_DepthVisualizeState"; tch["sampler[\"shadowMap\"]"] = "#AL_ShadowVizTexture"; tch["sampler[\"depthViz\"]"] = "core/scripts/client/lighting/advanced/depthviz"; tch["pixVersion"] = 2.0; tch.Create(); SingletonCreator ts = new SingletonCreator("GuiControlProfile", "AL_ShadowLabelTextProfile"); ts["fontColor"] = "0 0 0"; ts["autoSizeWidth"] = true; ts["autoSizeHeight"] = true; ts["justify"] = "left"; ts["fontSize"] = 14; ts.Create(); }
public static void initialize() { SingletonCreator oc_Newobject00002; SingletonCreator oc_Newobject00001; if (true) { #region GuiControlProfile (NavEditorProfile) oc_Newobject00001 oc_Newobject00001 = new SingletonCreator("GuiControlProfile", "NavEditorProfile"); oc_Newobject00001["canKeyFocus"] = new Creator.StringNoQuote("true"); oc_Newobject00001["opaque"] = new Creator.StringNoQuote("true"); oc_Newobject00001["fillColor"] = "192 192 192 192"; oc_Newobject00001["category"] = "Editor"; #endregion oc_Newobject00001.Create(); #region GuiControlProfile (GuiSimpleBorderProfile) oc_Newobject00002 oc_Newobject00002 = new SingletonCreator("GuiControlProfile", "GuiSimpleBorderProfile"); oc_Newobject00002["opaque"] = new Creator.StringNoQuote("false"); oc_Newobject00002["border"] = new Creator.StringNoQuote("1"); oc_Newobject00002["category"] = "Editor"; #endregion oc_Newobject00002.Create(); } }
public static void initialize() { SingletonCreator ts = new SingletonCreator("GFXStateBlockData", "FXAA_StateBlock : PFX_DefaultStateBlock"); ts["samplersDefined"] = true; ts["samplerStates[0]"] = "SamplerClampLinear"; ts.Create(); ts = new SingletonCreator("ShaderData", "FXAA_ShaderData"); ts["DXVertexShaderFile"] = "shaders/common/postFx/fxaa/fxaaV.hlsl"; ts["DXPixelShaderFile"] = "shaders/common/postFx/fxaa/fxaaP.hlsl"; ts["samplerNames[0]"] = "$colorTex"; ts["pixVersion"] = 3.0; ts.Create(); ts = new SingletonCreator("PostEffect", "FXAA_PostEffect", typeof (FXAA_PostEffect)); ts["isEnabled"] = false; ts["allowReflectPass"] = false; ts["renderTime"] = "PFXAfterDiffuse"; ts["texture[0]"] = "$backBuffer"; ts["target"] = "$backBuffer"; ts["stateBlock"] = "FXAA_StateBlock"; ts["shader"] = "FXAA_ShaderData"; ts.Create(); }
// 饿汉模式 public void HungryInit() { if (mInstance == null) { mInstance = SingletonCreator.CreateSingleton <T>(); } }
public static void initialize() { SingletonCreator ts = new SingletonCreator("PostEffect", "UnderwaterFogPostFx", typeof (UnderwaterFogPostEffect)); ts["oneFrameOnly"] = true; ts["onThisFrame"] = false; // Let the fog effect render during the // reflection pass. ts["allowReflectPass"] = true; ts["renderTime"] = "PFXBeforeBin"; ts["renderBin"] = "ObjTranslucentBin"; ts["shader"] = "UnderwaterFogPassShader"; ts["stateBlock"] = "UnderwaterFogPassStateBlock"; ts["texture[0]"] = "#prepass"; ts["texture[1]"] = "$backBuffer"; ts["texture[2]"] = "#waterDepthGradMap"; // Needs to happen after the FogPostFx ts["renderPriority"] = 4; ts["isEnabled"] = false; ts.Create(); }
public static void initialize() { SingletonCreator ts = new SingletonCreator("ShaderData", "BL_ShadowFilterShaderV"); ts["DXVertexShaderFile"] = "shaders/common/lighting/basic/shadowFilterV.hlsl"; ts["DXPixelShaderFile"] = "shaders/common/lighting/basic/shadowFilterP.hlsl"; ts["OGLVertexShaderFile"] = "shaders/common/lighting/basic/gl/shadowFilterV.glsl"; ts["OGLPixelShaderFile"] = "shaders/common/lighting/basic/gl/shadowFilterP.glsl"; ts["samplerNames[0]"] = "$diffuseMap"; ts["defines"] = "BLUR_DIR=float2(1.0,0.0)"; ts["pixVersion"] = 2.0; ts.Create(); ts = new SingletonCreator("ShaderData", "BL_ShadowFilterShaderH : BL_ShadowFilterShaderV"); ts["defines"] = "BLUR_DIR=float2(0.0,1.0)"; ts.Create(); ts = new SingletonCreator("GFXStateBlockData", "BL_ShadowFilterSB : PFX_DefaultStateBlock"); ts["colorWriteDefined"] = true; ts["colorWriteRed"] = false; ts["colorWriteGreen"] = false; ts["colorWriteBlue"] = false; ts["blendDefined"] = true; ts["blendEnable"] = true; ts.Create(); BL_ShadowFilterPostEffect.initialize(); }
public static void initialize() { SingletonCreator ts = new SingletonCreator("GFXStateBlockData", "PFX_TurbulenceStateBlock : PFX_DefaultStateBlock"); ts["zDefined"] = false; ts["zEnable"] = false; ts["zWriteEnable"] = false; ts["samplersDefined"] = true; ts["samplerStates[0]"] = "SamplerClampLinear"; ts = new SingletonCreator("ShaderData", "PFX_TurbulenceShader"); ts["DXVertexShaderFile"] = "shaders/common/postFx/postFxV.hlsl"; ts["DXPixelShaderFile"] = "shaders/common/postFx/turbulenceP.hlsl"; ts["pixVersion"] = 3.0; ts.Create(); ts = new SingletonCreator("PostEffect", "TurbulenceFx", typeof(TurbulencePostEffect)); ts["isEnabled"] = "$PostFXManager::PostFX::Enabled"; ts["allowReflectPass"] = true; ts["renderTime"] = "PFXAfterBin"; ts["renderBin"] = "GlowBin"; ts["renderPriority"] = 0.5; ts["shader"] = "PFX_TurbulenceShader"; ts["stateBlock"] = "PFX_myShaderStateBlock"; ts["texture[0]"] = "$backBuffer"; ts.Create(); }
public static void initialize() { SingletonCreator ts = new SingletonCreator("ShaderData", "GammaShader"); ts["DXVertexShaderFile"] = "shaders/common/postFx/postFxV.hlsl"; ts["DXPixelShaderFile"] = "shaders/common/postFx/gammaP.hlsl"; ts["pixVersion"] = 2.0; ts.Create(); ts = new SingletonCreator("GFXStateBlockData", "GammaStateBlock : PFX_DefaultStateBlock"); ts["samplersDefined"] = true; ts["samplerStates[0]"] = "SamplerClampLinear"; ts["samplerStates[1]"] = "SamplerClampLinear"; ts.Create(); ts = new SingletonCreator("PostEffect", "GammaPostFX", typeof (GammaPostEffect)); ts["isEnabled"] = false; ts["allowReflectPass"] = false; ts["renderTime"] = "PFXBeforeBin"; ts["renderBin"] = "EditorBin"; ts["renderPriority"] = 9999; ts["shader"] = "GammaShader"; ts["stateBlock"] = "GammaStateBlock"; ts["texture[0]"] = "$backBuffer"; ts["texture[1]"] = '"' + mColorCorrectionFileName + '"'; // "$HDRPostFX::colorCorrectionRamp"; ts.Create(); }
public static void initialize() { SingletonCreator ts = new SingletonCreator("GFXStateBlockData", "PFX_TurbulenceStateBlock : PFX_DefaultStateBlock"); ts["zDefined"] = false; ts["zEnable"] = false; ts["zWriteEnable"] = false; ts["samplersDefined"] = true; ts["samplerStates[0]"] = "SamplerClampLinear"; ts = new SingletonCreator("ShaderData", "PFX_TurbulenceShader"); ts["DXVertexShaderFile"] = "shaders/common/postFx/postFxV.hlsl"; ts["DXPixelShaderFile"] = "shaders/common/postFx/turbulenceP.hlsl"; ts["pixVersion"] = 3.0; ts.Create(); ts = new SingletonCreator("PostEffect", "TurbulenceFx", typeof (TurbulencePostEffect)); ts["isEnabled"] = "$PostFXManager::PostFX::Enabled"; ts["allowReflectPass"] = true; ts["renderTime"] = "PFXAfterBin"; ts["renderBin"] = "GlowBin"; ts["renderPriority"] = 0.5; ts["shader"] = "PFX_TurbulenceShader"; ts["stateBlock"] = "PFX_myShaderStateBlock"; ts["texture[0]"] = "$backBuffer"; ts.Create(); }
public static void initialize() { SingletonCreator ts = new SingletonCreator("PostEffect", "BL_ShadowFilterPostFx", typeof(BL_ShadowFilterPostEffect)); // Blur vertically ts["shader"] = "BL_ShadowFilterShaderV"; ts["stateBlock"] = "PFX_DefaultStateBlock"; //Todo See if there is a way to autodetect this. ts["targetClear"] = "\"PFXTargetClear_OnDraw\""; //No way to easily detect that this belongs in quotes, so gotta toss it in quotes manually. ts["targetClearColor"] = "0 0 0 0"; ts["texture[0]"] = "$inTex"; ts["target"] = "$outTex"; // Blur horizontal ObjectCreator tch = new ObjectCreator("PostEffect"); tch["shader"] = "BL_ShadowFilterShaderH"; tch["stateBlock"] = "PFX_DefaultStateBlock"; tch["texture[0]"] = "$inTex"; tch["target"] = "$outTex"; ts["#1"] = tch; ts.Create(); }
public static void initialize() { #region GuiControlProfile ( RiverEditorProfile ) oc_Newobject1 SingletonCreator oc_Newobject1 = new SingletonCreator("GuiControlProfile", "RiverEditorProfile"); oc_Newobject1["canKeyFocus"] = new Creator.StringNoQuote("true"); oc_Newobject1["opaque"] = new Creator.StringNoQuote("true"); oc_Newobject1["fillColor"] = "192 192 192 192"; oc_Newobject1["category"] = "Editor"; #endregion oc_Newobject1.Create(); #region GuiControlProfile (GuiSimpleBorderProfile) oc_Newobject2 SingletonCreator oc_Newobject2 = new SingletonCreator("GuiControlProfile ", "GuiSimpleBorderProfile"); oc_Newobject2["opaque"] = new Creator.StringNoQuote("false"); oc_Newobject2["border"] = new Creator.StringNoQuote("1"); oc_Newobject2["category"] = "Editor"; #endregion oc_Newobject2.Create(); }
public static void initialize() { SingletonCreator sc = new SingletonCreator("GFXStateBlockData", "ScatterSkySBData"); sc["cullDefined"] = true; sc["cullMode"] = "GFXCullNone"; sc["zDefined"] = true; sc["zEnable"] = true; sc["zWriteEnable"] = false; sc["zFunc"] = "GFXCmpLessEqual"; sc["samplersDefined"] = true; sc["samplerStates[0]"] = "SamplerClampLinear"; sc["samplerStates[1]"] = "SamplerClampLinear"; sc["vertexColorEnable"] = true; sc.Create(); sc = new SingletonCreator("ShaderData", "ScatterSkyShaderData"); sc["DXVertexShaderFile"] = "shaders/common/scatterSkyV.hlsl"; sc["DXPixelShaderFile"] = "shaders/common/scatterSkyP.hlsl"; sc["OGLVertexShaderFile"] = "shaders/common/gl/scatterSkyV.glsl"; sc["OGLPixelShaderFile"] = "shaders/common/gl/scatterSkyP.glsl"; sc["pixVersion"] = 2.0; sc.Create(); }
public static void initialize() { #region GuiControlProfile ( RiverEditorProfile ) oc_Newobject1 SingletonCreator oc_Newobject1 = new SingletonCreator("GuiControlProfile", "RiverEditorProfile"); oc_Newobject1["canKeyFocus"] = new ObjectCreator.StringNoQuote("true"); oc_Newobject1["opaque"] = new ObjectCreator.StringNoQuote("true"); oc_Newobject1["fillColor"] = "192 192 192 192"; oc_Newobject1["category"] = "Editor"; #endregion oc_Newobject1.Create(); #region GuiControlProfile (GuiSimpleBorderProfile) oc_Newobject2 SingletonCreator oc_Newobject2 = new SingletonCreator("GuiControlProfile ", "GuiSimpleBorderProfile"); oc_Newobject2["opaque"] = new ObjectCreator.StringNoQuote("false"); oc_Newobject2["border"] = new ObjectCreator.StringNoQuote("1"); oc_Newobject2["category"] = "Editor"; #endregion oc_Newobject2.Create(); }
public static void initialize() { SingletonCreator sc = new SingletonCreator("GFXStateBlockData", "ScatterSkySBData"); sc["cullDefined"] = true; sc["cullMode"] = "GFXCullNone"; sc["zDefined"] = true; sc["zEnable"] = true; sc["zWriteEnable"] = false; sc["zFunc"] = "GFXCmpLessEqual"; sc["samplersDefined"] = true; sc["samplerStates[0]"] = "SamplerClampLinear"; sc["samplerStates[1]"] = "SamplerClampLinear"; sc["vertexColorEnable"] = true; sc.Create(); sc = new SingletonCreator("ShaderData", "ScatterSkyShaderData"); sc["DXVertexShaderFile"] = "shaders/common/scatterSkyV.hlsl"; sc["DXPixelShaderFile"] = "shaders/common/scatterSkyP.hlsl"; sc["OGLVertexShaderFile"] = "shaders/common/gl/scatterSkyV.glsl"; sc["OGLPixelShaderFile"] = "shaders/common/gl/scatterSkyP.glsl"; sc["pixVersion"] = 2.0; sc.Create(); }
public static void initialize() { #region GuiControlProfile (GuiMatEdSliderProfile) oc_Newobject1 SingletonCreator oc_Newobject1 = new SingletonCreator("GuiControlProfile ", "GuiMatEdSliderProfile"); oc_Newobject1["bitmap"] = "./matEdSlider"; oc_Newobject1["category"] = "Editor"; #endregion oc_Newobject1.Create(); #region GuiControlProfile (GuiMatEdRightJustifyProfile) oc_Newobject2 SingletonCreator oc_Newobject2 = new SingletonCreator("GuiControlProfile ", "GuiMatEdRightJustifyProfile"); oc_Newobject2["fontType"] = "Arial"; oc_Newobject2["fontSize"] = new Creator.StringNoQuote("14"); oc_Newobject2["fontCharset"] = new Creator.StringNoQuote("ANSI"); oc_Newobject2["fontColor"] = "0 0 0"; oc_Newobject2["justify"] = "right"; oc_Newobject2["category"] = "Editor"; #endregion oc_Newobject2.Create(); #region GuiControlProfile (GuiMatEdPopUpMenuProfile) oc_Newobject3 SingletonCreator oc_Newobject3 = new SingletonCreator("GuiControlProfile", "GuiMatEdPopUpMenuProfile"); oc_Newobject3["opaque"] = new Creator.StringNoQuote("false"); oc_Newobject3["mouseOverSelected"] = new Creator.StringNoQuote("true"); oc_Newobject3["textOffset"] = "3 3"; oc_Newobject3["border"] = new Creator.StringNoQuote("1"); oc_Newobject3["fixedExtent"] = new Creator.StringNoQuote("true"); oc_Newobject3["bitmap"] = "tools/editorClasses/gui/images/scroll"; oc_Newobject3["hasBitmapArray"] = new Creator.StringNoQuote("true"); oc_Newobject3["profileForChildren"] = new Creator.StringNoQuote("GuiControlListPopupProfile"); oc_Newobject3["fillColor"] = "255 0 0 255"; oc_Newobject3["fontColor"] = "255 255 255 255"; oc_Newobject3["fillColorHL"] = "50 50 50"; oc_Newobject3["fontColorHL"] = "220 220 220"; oc_Newobject3["borderColor"] = "100 100 108"; oc_Newobject3["category"] = "Editor"; #endregion oc_Newobject3.Create(); #region GuiControlProfile (MatEdCenteredTextProfile) oc_Newobject4 SingletonCreator oc_Newobject4 = new SingletonCreator("GuiControlProfile ", "MatEdCenteredTextProfile"); oc_Newobject4["fontColor"] = "0 0 0"; oc_Newobject4["justify"] = "center"; oc_Newobject4["category"] = "Editor"; #endregion oc_Newobject4.Create(); }
public static void initialize() { #region GuiControlProfile (GuiMatEdSliderProfile) oc_Newobject1 SingletonCreator oc_Newobject1 = new SingletonCreator("GuiControlProfile ", "GuiMatEdSliderProfile"); oc_Newobject1["bitmap"] = "./matEdSlider"; oc_Newobject1["category"] = "Editor"; #endregion oc_Newobject1.Create(); #region GuiControlProfile (GuiMatEdRightJustifyProfile) oc_Newobject2 SingletonCreator oc_Newobject2 = new SingletonCreator("GuiControlProfile ", "GuiMatEdRightJustifyProfile"); oc_Newobject2["fontType"] = "Arial"; oc_Newobject2["fontSize"] = new ObjectCreator.StringNoQuote("14"); oc_Newobject2["fontCharset"] = new ObjectCreator.StringNoQuote("ANSI"); oc_Newobject2["fontColor"] = "0 0 0"; oc_Newobject2["justify"] = "right"; oc_Newobject2["category"] = "Editor"; #endregion oc_Newobject2.Create(); #region GuiControlProfile (GuiMatEdPopUpMenuProfile) oc_Newobject3 SingletonCreator oc_Newobject3 = new SingletonCreator("GuiControlProfile", "GuiMatEdPopUpMenuProfile"); oc_Newobject3["opaque"] = new ObjectCreator.StringNoQuote("false"); oc_Newobject3["mouseOverSelected"] = new ObjectCreator.StringNoQuote("true"); oc_Newobject3["textOffset"] = "3 3"; oc_Newobject3["border"] = new ObjectCreator.StringNoQuote("1"); oc_Newobject3["fixedExtent"] = new ObjectCreator.StringNoQuote("true"); oc_Newobject3["bitmap"] = "tools/editorClasses/gui/images/scroll"; oc_Newobject3["hasBitmapArray"] = new ObjectCreator.StringNoQuote("true"); oc_Newobject3["profileForChildren"] = new ObjectCreator.StringNoQuote("GuiControlListPopupProfile"); oc_Newobject3["fillColor"] = "255 0 0 255"; oc_Newobject3["fontColor"] = "255 255 255 255"; oc_Newobject3["fillColorHL"] = "50 50 50"; oc_Newobject3["fontColorHL"] = "220 220 220"; oc_Newobject3["borderColor"] = "100 100 108"; oc_Newobject3["category"] = "Editor"; #endregion oc_Newobject3.Create(); #region GuiControlProfile (MatEdCenteredTextProfile) oc_Newobject4 SingletonCreator oc_Newobject4 = new SingletonCreator("GuiControlProfile ", "MatEdCenteredTextProfile"); oc_Newobject4["fontColor"] = "0 0 0"; oc_Newobject4["justify"] = "center"; oc_Newobject4["category"] = "Editor"; #endregion oc_Newobject4.Create(); }
public static void initialize() { omni.dGlobal["$LightRayPostFX::brightScalar"] = 0.75; omni.dGlobal["$LightRayPostFX::numSamples"] = 40; omni.dGlobal["$LightRayPostFX::density"] = 0.94; omni.dGlobal["$LightRayPostFX::weight"] = 5.65; omni.dGlobal["$LightRayPostFX::decay"] = 1.0; omni.dGlobal["$LightRayPostFX::exposure"] = 0.0005; omni.dGlobal["$LightRayPostFX::resolutionScale"] = 1.0; SingletonCreator ts = new SingletonCreator("ShaderData", "LightRayOccludeShader"); ts["DXVertexShaderFile"] = "shaders/common/postFx/postFxV.hlsl"; ts["DXPixelShaderFile"] = "shaders/common/postFx/lightRay/lightRayOccludeP.hlsl"; ts["pixVersion"] = 3.0; ts.Create(); ts = new SingletonCreator("ShaderData", "LightRayShader"); ts["DXVertexShaderFile"] = "shaders/common/postFx/postFxV.hlsl"; ts["DXPixelShaderFile"] = "shaders/common/postFx/lightRay/lightRayP.hlsl"; ts["pixVersion"] = 3.0; ts.Create(); ts = new SingletonCreator("GFXStateBlockData", "LightRayStateBlock : PFX_DefaultStateBlock"); ts["samplersDefined"] = true; ts["samplerStates[0]"] = "SamplerClampLinear"; ts["samplerStates[1]"] = "SamplerClampLinear"; ts.Create(); SingletonCreator LightRayPostFX = new SingletonCreator("PostEffect", "LightRayPostFX", typeof(LightRayPostEffect)); LightRayPostFX["isEnabled"] = true; LightRayPostFX["allowReflectPass"] = false; LightRayPostFX["renderTime"] = "PFXBeforeBin"; LightRayPostFX["renderBin"] = "EditorBin"; LightRayPostFX["renderPriority"] = 10; LightRayPostFX["shader"] = "LightRayOccludeShader"; LightRayPostFX["stateBlock"] = "LightRayStateBlock"; LightRayPostFX["texture[0]"] = "$backBuffer"; LightRayPostFX["texture[1]"] = "#prepass"; LightRayPostFX["target"] = "$outTex"; LightRayPostFX["targetFormat"] = "GFXFormatR16G16B16A16F"; ObjectCreator final = new ObjectCreator("PostEffect", "LightRayPostFX_final"); final["shader"] = "LightRayShader"; final["stateBlock"] = "LightRayStateBlock"; final["internalName"] = "final"; final["texture[0]"] = "$inTex"; final["texture[1]"] = "$backBuffer"; final["target"] = "$backBuffer"; LightRayPostFX["#1"] = final; LightRayPostFX.Create(); }
public static void initialize() { SingletonCreator ts = new SingletonCreator("PostEffect", "AL_LightColorVisualize", typeof (AL_LightColorVisualizePostEffect)); ts["shader"] = "AL_LightColorVisualizeShader"; ts["stateBlock"] = "AL_DefaultVisualizeState"; ts["texture[0]"] = "#lightinfo"; ts["target"] = "$backBuffer"; ts["renderPriority"] = 9999; ts.Create(); }
public static void initialize() { SingletonCreator ts = new SingletonCreator("PostEffect", "AL_DepthVisualize", typeof (AL_DepthVisualPostEffect)); ts["shader"] = "AL_DepthVisualizeShader"; ts["stateBlock"] = "AL_DefaultVisualizeState"; ts["texture[0]"] = "#prepass"; ts["texture[1]"] = "core/scripts/client/lighting/advanced/depthviz.png"; ts["target"] = "$backBuffer"; ts["renderPriority"] = 9999; ts.Create(); }
public static void initialize() { omni.dGlobal["$LightRayPostFX::brightScalar"] = 0.75; omni.dGlobal["$LightRayPostFX::numSamples"] = 40; omni.dGlobal["$LightRayPostFX::density"] = 0.94; omni.dGlobal["$LightRayPostFX::weight"] = 5.65; omni.dGlobal["$LightRayPostFX::decay"] = 1.0; omni.dGlobal["$LightRayPostFX::exposure"] = 0.0005; omni.dGlobal["$LightRayPostFX::resolutionScale"] = 1.0; SingletonCreator ts = new SingletonCreator("ShaderData", "LightRayOccludeShader"); ts["DXVertexShaderFile"] = "shaders/common/postFx/postFxV.hlsl"; ts["DXPixelShaderFile"] = "shaders/common/postFx/lightRay/lightRayOccludeP.hlsl"; ts["pixVersion"] = 3.0; ts.Create(); ts = new SingletonCreator("ShaderData", "LightRayShader"); ts["DXVertexShaderFile"] = "shaders/common/postFx/postFxV.hlsl"; ts["DXPixelShaderFile"] = "shaders/common/postFx/lightRay/lightRayP.hlsl"; ts["pixVersion"] = 3.0; ts.Create(); ts = new SingletonCreator("GFXStateBlockData", "LightRayStateBlock : PFX_DefaultStateBlock"); ts["samplersDefined"] = true; ts["samplerStates[0]"] = "SamplerClampLinear"; ts["samplerStates[1]"] = "SamplerClampLinear"; ts.Create(); SingletonCreator LightRayPostFX = new SingletonCreator("PostEffect", "LightRayPostFX", typeof (LightRayPostEffect)); LightRayPostFX["isEnabled"] = true; LightRayPostFX["allowReflectPass"] = false; LightRayPostFX["renderTime"] = "PFXBeforeBin"; LightRayPostFX["renderBin"] = "EditorBin"; LightRayPostFX["renderPriority"] = 10; LightRayPostFX["shader"] = "LightRayOccludeShader"; LightRayPostFX["stateBlock"] = "LightRayStateBlock"; LightRayPostFX["texture[0]"] = "$backBuffer"; LightRayPostFX["texture[1]"] = "#prepass"; LightRayPostFX["target"] = "$outTex"; LightRayPostFX["targetFormat"] = "GFXFormatR16G16B16A16F"; ObjectCreator final = new ObjectCreator("PostEffect", "LightRayPostFX_final"); final["shader"] = "LightRayShader"; final["stateBlock"] = "LightRayStateBlock"; final["internalName"] = "final"; final["texture[0]"] = "$inTex"; final["texture[1]"] = "$backBuffer"; final["target"] = "$backBuffer"; LightRayPostFX["#1"] = final; LightRayPostFX.Create(); }
public static void initialize() { SingletonCreator ts = new SingletonCreator("PostEffect", "AL_LightSpecularVisualize", typeof(AL_LightSpecularVisualizePostEffect)); ts["shader"] = "AL_LightSpecularVisualizeShader"; ts["stateBlock"] = "AL_DefaultVisualizeState"; ts["texture[0]"] = "#lightinfo"; ts["target"] = "$backBuffer"; ts["renderPriority"] = 9999; ts.Create(); }
public void RegisterType <From, To>(bool singleton) where To : From { if (singleton) { creators[typeof(From)] = new SingletonCreator(typeof(To).GetConstructor(new Type[] { })); } else { creators[typeof(From)] = new NonSingletonCreator(typeof(To).GetConstructor(new Type[] { })); } }
public void RegisterType <T>(bool singleton) where T : class { if (singleton) { creators[typeof(T)] = new SingletonCreator(typeof(T).GetConstructor(new Type[] { })); } else { creators[typeof(T)] = new NonSingletonCreator(typeof(T).GetConstructor(new Type[] { })); } }
public static void initialize() { #region GuiControlProfile (ForestEditorProfile) oc_Newobject1 SingletonCreator oc_Newobject1 = new SingletonCreator("GuiControlProfile ", "ForestEditorProfile"); oc_Newobject1["canKeyFocus"] = new Creator.StringNoQuote("true"); oc_Newobject1["category"] = "Editor"; #endregion oc_Newobject1.Create(); }
public static void initialize() { #region GuiControlProfile (ForestEditorProfile) oc_Newobject1 SingletonCreator oc_Newobject1 = new SingletonCreator("GuiControlProfile ", "ForestEditorProfile"); oc_Newobject1["canKeyFocus"] = new Creator.StringNoQuote("true"); oc_Newobject1["category"] = "Editor"; #endregion oc_Newobject1.Create(); }
private static object mLock = new object(); //添加线程锁 public static T Instance() { lock (mLock) { if (instance == null) { instance = SingletonCreator.Create <T>(); } } return(instance); }
public static void initialize() { SingletonCreator sc = new SingletonCreator("ShaderData", "TerrainBlendShader"); sc["DXVertexShaderFile"] = "shaders/common/terrain/blendV.hlsl"; sc["DXPixelShaderFile"] = "shaders/common/terrain/blendP.hlsl"; sc["OGLVertexShaderFile"] = "shaders/common/terrain/gl/blendV.glsl"; sc["OGLPixelShaderFile"] = "shaders/common/terrain/gl/blendP.glsl"; sc["pixVersion"] = 2.0; sc.Create(); }
public static void initialize() { SingletonCreator ts = new SingletonCreator("PostEffect", "AL_DepthVisualize", typeof(AL_DepthVisualPostEffect)); ts["shader"] = "AL_DepthVisualizeShader"; ts["stateBlock"] = "AL_DefaultVisualizeState"; ts["texture[0]"] = "#prepass"; ts["texture[1]"] = "core/scripts/client/lighting/advanced/depthviz.png"; ts["target"] = "$backBuffer"; ts["renderPriority"] = 9999; ts.Create(); }
public static void initialize() { SingletonCreator sc = new SingletonCreator("ShaderData", "TerrainBlendShader"); sc["DXVertexShaderFile"] = "shaders/common/terrain/blendV.hlsl"; sc["DXPixelShaderFile"] = "shaders/common/terrain/blendP.hlsl"; sc["OGLVertexShaderFile"] = "shaders/common/terrain/gl/blendV.glsl"; sc["OGLPixelShaderFile"] = "shaders/common/terrain/gl/blendP.glsl"; sc["pixVersion"] = 2.0; sc.Create(); }
public static void initialize() { #region GuiControlProfile ( MissionAreaEditorProfile ) oc_Newobject1 SingletonCreator oc_Newobject1 = new SingletonCreator("GuiControlProfile", "MissionAreaEditorProfile"); oc_Newobject1["canKeyFocus"] = new ObjectCreator.StringNoQuote("true"); oc_Newobject1["opaque"] = new ObjectCreator.StringNoQuote("true"); oc_Newobject1["fillColor"] = "192 192 192"; oc_Newobject1["category"] = "Editor"; #endregion oc_Newobject1.Create(); }
public static void initialize() { #region GuiControlProfile ( MissionAreaEditorProfile ) oc_Newobject1 SingletonCreator oc_Newobject1 = new SingletonCreator("GuiControlProfile", "MissionAreaEditorProfile"); oc_Newobject1["canKeyFocus"] = new Creator.StringNoQuote("true"); oc_Newobject1["opaque"] = new Creator.StringNoQuote("true"); oc_Newobject1["fillColor"] = "192 192 192"; oc_Newobject1["category"] = "Editor"; #endregion oc_Newobject1.Create(); }
public static void initialize() { SingletonCreator ts = new SingletonCreator("GFXStateBlockData", "PFX_CausticsStateBlock : PFX_DefaultStateBlock"); ts["blendDefined"] = true; ts["blendEnable"] = true; ts["blendSrc"] = "GFXBlendOne"; ts["blendDest"] = "GFXBlendOne"; ts["samplersDefined"] = true; ts["samplerStates[0]"] = "SamplerClampLinear"; ts["samplerStates[1]"] = "SamplerWrapLinear"; ts["samplerStates[2]"] = "SamplerWrapLinear"; ts.Create(); ts = new SingletonCreator("ShaderData", "PFX_CausticsShader"); ts["DXVertexShaderFile"] = "shaders/common/postFx/postFxV.hlsl"; ts["DXPixelShaderFile"] = "shaders/common/postFx/caustics/causticsP.hlsl"; //OGLVertexShaderFile = "shaders/common/postFx/gl//postFxV.glsl"; //OGLPixelShaderFile = "shaders/common/postFx/gl/passthruP.glsl"; ts["samplerNames[0]"] = "$prepassTex"; ts["samplerNames[1]"] = "$causticsTex1"; ts["samplerNames[2]"] = "$causticsTex2"; ts["pixVersion"] = 3.0; ts.Create(); ts = new SingletonCreator("PostEffect", "CausticsPFX", typeof(CausticsPostEffect)); ts["requirements"] = "None"; ts["isEnabled"] = false; ts["renderTime"] = "PFXBeforeBin"; ts["renderBin"] = "ObjTranslucentBin"; //renderPriority = 0.1; ts["shader"] = "PFX_CausticsShader"; ts["stateBlock"] = "PFX_CausticsStateBlock"; ts["texture[0]"] = "#prepass"; ts["texture[1]"] = "core/scripts/client/postFx/textures/caustics_1.png"; ts["texture[2]"] = "core/scripts/client/postFx/textures/caustics_2.png"; ts["target"] = "$backBuffer"; ts.Create(); omni.iGlobal["$CausticsPFX::refTime"] = omni.Util.getSimTime(); omni.sGlobal["$CausticsPFX::color"] = "1.0 1.0 1.0 1.0"; }
public static void initialize() { #region GuiControlProfile (GuiShapeEdScrollProfile : GuiEditorScrollProfile) oc_Newobject1 SingletonCreator oc_Newobject1 = new SingletonCreator("GuiControlProfile", "GuiShapeEdScrollProfile : GuiEditorScrollProfile"); oc_Newobject1["opaque"] = new ObjectCreator.StringNoQuote("false"); oc_Newobject1["category"] = "Editor"; #endregion oc_Newobject1.Create(); #region GuiControlProfile (GuiShapeEdTextListProfile : ToolsGuiTextListProfile) oc_Newobject2 SingletonCreator oc_Newobject2 = new SingletonCreator("GuiControlProfile", "GuiShapeEdTextListProfile : ToolsGuiTextListProfile"); oc_Newobject2["fontColorNA"] = "75 75 75"; oc_Newobject2["category"] = "Editor"; #endregion oc_Newobject2.Create(); #region GuiControlProfile (GuiShapeEdRolloutProfile : GuiInspectorRolloutProfile0) oc_Newobject3 SingletonCreator oc_Newobject3 = new SingletonCreator("GuiControlProfile", "GuiShapeEdRolloutProfile : GuiInspectorRolloutProfile0"); oc_Newobject3["bitmap"] = "tools/editorclasses/gui/images/rollout"; oc_Newobject3["category"] = "Editor"; #endregion oc_Newobject3.Create(); #region GuiControlProfile ( GuiShapeEdTransitionSliderProfile ) oc_Newobject4 SingletonCreator oc_Newobject4 = new SingletonCreator("GuiControlProfile", "GuiShapeEdTransitionSliderProfile"); oc_Newobject4["bitmap"] = "tools/shapeEditor/images/transition_slider"; oc_Newobject4["category"] = "Core"; #endregion oc_Newobject4.Create(); }
public static void initialize() { SingletonCreator sc = new SingletonCreator("Material", "WarningMaterial"); sc["diffuseMap[0]"] = "core/art/warnMat"; sc["emissive[0]"] = false; sc["translucent"] = false; sc.Create(); sc = new SingletonCreator("CubemapData", "WarnMatCubeMap"); sc["cubeFace[0]"] = "core/art/warnMat"; sc["cubeFace[1]"] = "core/art/warnMat"; sc["cubeFace[2]"] = "core/art/warnMat"; sc["cubeFace[3]"] = "core/art/warnMat"; sc["cubeFace[4]"] = "core/art/warnMat"; sc["cubeFace[5]"] = "core/art/warnMat"; sc.Create(); }
public static void initialize() { SingletonCreator ts = new SingletonCreator("GFXStateBlockData", "PFX_CausticsStateBlock : PFX_DefaultStateBlock"); ts["blendDefined"] = true; ts["blendEnable"] = true; ts["blendSrc"] = "GFXBlendOne"; ts["blendDest"] = "GFXBlendOne"; ts["samplersDefined"] = true; ts["samplerStates[0]"] = "SamplerClampLinear"; ts["samplerStates[1]"] = "SamplerWrapLinear"; ts["samplerStates[2]"] = "SamplerWrapLinear"; ts.Create(); ts = new SingletonCreator("ShaderData", "PFX_CausticsShader"); ts["DXVertexShaderFile"] = "shaders/common/postFx/postFxV.hlsl"; ts["DXPixelShaderFile"] = "shaders/common/postFx/caustics/causticsP.hlsl"; //OGLVertexShaderFile = "shaders/common/postFx/gl//postFxV.glsl"; //OGLPixelShaderFile = "shaders/common/postFx/gl/passthruP.glsl"; ts["samplerNames[0]"] = "$prepassTex"; ts["samplerNames[1]"] = "$causticsTex1"; ts["samplerNames[2]"] = "$causticsTex2"; ts["pixVersion"] = 3.0; ts.Create(); ts = new SingletonCreator("PostEffect", "CausticsPFX", typeof (CausticsPostEffect)); ts["requirements"] = "None"; ts["isEnabled"] = false; ts["renderTime"] = "PFXBeforeBin"; ts["renderBin"] = "ObjTranslucentBin"; //renderPriority = 0.1; ts["shader"] = "PFX_CausticsShader"; ts["stateBlock"] = "PFX_CausticsStateBlock"; ts["texture[0]"] = "#prepass"; ts["texture[1]"] = "core/scripts/client/postFx/textures/caustics_1.png"; ts["texture[2]"] = "core/scripts/client/postFx/textures/caustics_2.png"; ts["target"] = "$backBuffer"; ts.Create(); omni.iGlobal["$CausticsPFX::refTime"] = omni.Util.getSimTime(); omni.sGlobal["$CausticsPFX::color"] = "1.0 1.0 1.0 1.0"; }
public static void initialize() { #region GuiControlProfile ( ConvexEditorProfile ) oc_Newobject1 SingletonCreator oc_Newobject1 = new SingletonCreator("GuiControlProfile", "ConvexEditorProfile"); oc_Newobject1["canKeyFocus"] = new Creator.StringNoQuote("true"); oc_Newobject1["opaque"] = new Creator.StringNoQuote("true"); oc_Newobject1["fillColor"] = "192 192 192 192"; oc_Newobject1["category"] = "Editor"; #endregion oc_Newobject1.Create(); #region GuiControlProfile (GuiDisabledTextEditProfile) oc_Newobject2 SingletonCreator oc_Newobject2 = new SingletonCreator("GuiControlProfile ", "GuiDisabledTextEditProfile"); oc_Newobject2["opaque"] = new Creator.StringNoQuote("false"); oc_Newobject2["border"] = new Creator.StringNoQuote("0"); oc_Newobject2["bitmap"] = "tools/gui/images/textEdit"; oc_Newobject2["borderColor"] = "255 255 255 200"; oc_Newobject2["fontColor"] = "0 0 0"; oc_Newobject2["fontColorHL"] = "255 255 255"; oc_Newobject2["fontColorNA"] = "128 128 128"; oc_Newobject2["textOffset"] = "4 2"; oc_Newobject2["autoSizeWidth"] = new Creator.StringNoQuote("false"); oc_Newobject2["autoSizeHeight"] = new Creator.StringNoQuote("false"); oc_Newobject2["tab"] = new Creator.StringNoQuote("false"); oc_Newobject2["canKeyFocus"] = new Creator.StringNoQuote("false"); oc_Newobject2["category"] = "Editor"; #endregion oc_Newobject2.Create(); #region GuiControlProfile (GuiSimpleBorderProfile) oc_Newobject3 SingletonCreator oc_Newobject3 = new SingletonCreator("GuiControlProfile ", "GuiSimpleBorderProfile"); oc_Newobject3["opaque"] = new Creator.StringNoQuote("false"); oc_Newobject3["border"] = new Creator.StringNoQuote("1"); oc_Newobject3["category"] = "Editor"; #endregion oc_Newobject3.Create(); }
public static void initialize() { #region GuiControlProfile ( ConvexEditorProfile ) oc_Newobject1 SingletonCreator oc_Newobject1 = new SingletonCreator("GuiControlProfile", "ConvexEditorProfile"); oc_Newobject1["canKeyFocus"] = new Creator.StringNoQuote("true"); oc_Newobject1["opaque"] = new Creator.StringNoQuote("true"); oc_Newobject1["fillColor"] = "192 192 192 192"; oc_Newobject1["category"] = "Editor"; #endregion oc_Newobject1.Create(); #region GuiControlProfile (GuiDisabledTextEditProfile) oc_Newobject2 SingletonCreator oc_Newobject2 = new SingletonCreator("GuiControlProfile ", "GuiDisabledTextEditProfile"); oc_Newobject2["opaque"] = new Creator.StringNoQuote("false"); oc_Newobject2["border"] = new Creator.StringNoQuote("0"); oc_Newobject2["bitmap"] = "tools/gui/images/textEdit"; oc_Newobject2["borderColor"] = "255 255 255 200"; oc_Newobject2["fontColor"] = "0 0 0"; oc_Newobject2["fontColorHL"] = "255 255 255"; oc_Newobject2["fontColorNA"] = "128 128 128"; oc_Newobject2["textOffset"] = "4 2"; oc_Newobject2["autoSizeWidth"] = new Creator.StringNoQuote("false"); oc_Newobject2["autoSizeHeight"] = new Creator.StringNoQuote("false"); oc_Newobject2["tab"] = new Creator.StringNoQuote("false"); oc_Newobject2["canKeyFocus"] = new Creator.StringNoQuote("false"); oc_Newobject2["category"] = "Editor"; #endregion oc_Newobject2.Create(); #region GuiControlProfile (GuiSimpleBorderProfile) oc_Newobject3 SingletonCreator oc_Newobject3 = new SingletonCreator("GuiControlProfile ", "GuiSimpleBorderProfile"); oc_Newobject3["opaque"] = new Creator.StringNoQuote("false"); oc_Newobject3["border"] = new Creator.StringNoQuote("1"); oc_Newobject3["category"] = "Editor"; #endregion oc_Newobject3.Create(); }
public static void initialize() { SingletonCreator sc = new SingletonCreator("Material", "WarningMaterial"); sc["diffuseMap[0]"] = "core/art/warnMat"; sc["emissive[0]"] = false; sc["translucent"] = false; sc.Create(); sc = new SingletonCreator("CubemapData", "WarnMatCubeMap"); sc["cubeFace[0]"] = "core/art/warnMat"; sc["cubeFace[1]"] = "core/art/warnMat"; sc["cubeFace[2]"] = "core/art/warnMat"; sc["cubeFace[3]"] = "core/art/warnMat"; sc["cubeFace[4]"] = "core/art/warnMat"; sc["cubeFace[5]"] = "core/art/warnMat"; sc.Create(); }
public static void initialize() { SingletonCreator ts = new SingletonCreator("ShaderData", "PFX_MotionBlurShader"); ts["DXVertexShaderFile"] = "shaders/common/postFx/postFxV.hlsl"; //we use the bare-bones postFxV.hlsl ts["DXPixelShaderFile"] = "shaders/common/postFx/motionBlurP.hlsl"; //new pixel shader ts["pixVersion"] = 3.0; ts.Create(); SingletonCreator MotionBlurFX = new SingletonCreator("PostEffect", "MotionBlurFX", typeof (MotionBlurPostEffect)); MotionBlurFX["isEnabled"] = false; MotionBlurFX["renderTime"] = "PFXAfterDiffuse"; MotionBlurFX["shader"] = "PFX_MotionBlurShader"; MotionBlurFX["stateBlock"] = "PFX_DefaultStateBlock"; MotionBlurFX["texture[0]"] = "$backbuffer"; MotionBlurFX["texture[1]"] = "#prepass"; MotionBlurFX["target"] = "$backBuffer"; MotionBlurFX.Create(); }
public static void initialize() { #region GuiControlProfile (GuiShapeEdScrollProfile : GuiEditorScrollProfile) oc_Newobject1 SingletonCreator oc_Newobject1 = new SingletonCreator("GuiControlProfile", "GuiShapeEdScrollProfile : GuiEditorScrollProfile"); oc_Newobject1["opaque"] = new Creator.StringNoQuote("false"); oc_Newobject1["category"] = "Editor"; #endregion oc_Newobject1.Create(); #region GuiControlProfile (GuiShapeEdTextListProfile : ToolsGuiTextListProfile) oc_Newobject2 SingletonCreator oc_Newobject2 = new SingletonCreator("GuiControlProfile", "GuiShapeEdTextListProfile : ToolsGuiTextListProfile"); oc_Newobject2["fontColorNA"] = "75 75 75"; oc_Newobject2["category"] = "Editor"; #endregion oc_Newobject2.Create(); #region GuiControlProfile (GuiShapeEdRolloutProfile : GuiInspectorRolloutProfile0) oc_Newobject3 SingletonCreator oc_Newobject3 = new SingletonCreator("GuiControlProfile", "GuiShapeEdRolloutProfile : GuiInspectorRolloutProfile0"); oc_Newobject3["bitmap"] = "tools/editorclasses/gui/images/rollout"; oc_Newobject3["category"] = "Editor"; #endregion oc_Newobject3.Create(); #region GuiControlProfile ( GuiShapeEdTransitionSliderProfile ) oc_Newobject4 SingletonCreator oc_Newobject4 = new SingletonCreator("GuiControlProfile", "GuiShapeEdTransitionSliderProfile"); oc_Newobject4["bitmap"] = "tools/shapeEditor/images/transition_slider"; oc_Newobject4["category"] = "Core"; #endregion oc_Newobject4.Create(); }
public static T InstanceCustomCtor(Func <T> ctor) { if (ctor == null) { throw new ArgumentException("You must provide a valid constructor"); } if (SingletonCreator._instance == null) { lock (_lock) { if (SingletonCreator._instance == null) { SingletonCreator.Initialize(ctor); } } } return(SingletonCreator._instance); }
public static void initialize() { SingletonCreator sc = new SingletonCreator("GFXStateBlockData", "AL_FormatTokenState : PFX_DefaultStateBlock"); sc["samplersDefined"] = true; sc["samplerStates[0]"] = "SamplerClampPoint"; sc.Create(); sc = new SingletonCreator("PostEffect", "AL_FormatCopy"); // This PostEffect is used by 'AL_FormatToken' directly. It is never added to // the PostEffectManager. Do not call enable() on it. sc["isEnabled"] = false; sc["allowReflectPass"] = true; sc["shader"] = "PFX_PassthruShader"; sc["stateBlock"] = "AL_FormatTokenState"; sc["texture[0]"] = "$inTex"; sc["target"] = "$backbuffer"; sc.Create(); }
public static void initialize() { SingletonCreator ts = new SingletonCreator("ShaderData", "PFX_MotionBlurShader"); ts["DXVertexShaderFile"] = "shaders/common/postFx/postFxV.hlsl"; //we use the bare-bones postFxV.hlsl ts["DXPixelShaderFile"] = "shaders/common/postFx/motionBlurP.hlsl"; //new pixel shader ts["pixVersion"] = 3.0; ts.Create(); SingletonCreator MotionBlurFX = new SingletonCreator("PostEffect", "MotionBlurFX", typeof(MotionBlurPostEffect)); MotionBlurFX["isEnabled"] = false; MotionBlurFX["renderTime"] = "PFXAfterDiffuse"; MotionBlurFX["shader"] = "PFX_MotionBlurShader"; MotionBlurFX["stateBlock"] = "PFX_DefaultStateBlock"; MotionBlurFX["texture[0]"] = "$backbuffer"; MotionBlurFX["texture[1]"] = "#prepass"; MotionBlurFX["target"] = "$backBuffer"; MotionBlurFX.Create(); }
public static void initialize() { omni.console.print("\n--------- Initializing Shadow Filter ---------"); shadowFilter.initialize(); omni.console.print("\n--------- Finished Initializing Shadow Filter ---------"); SingletonCreator ts = new SingletonCreator("GFXStateBlockData", "BL_ProjectedShadowSBData"); ts["blendDefined"] = true; ts["blendEnable"] = true; ts["blendSrc"] = "GFXBlendDestColor"; ts["blendDest"] = "GFXBlendZero"; ts["zDefined"] = true; ts["zEnable"] = true; ts["zWriteEnable"] = false; ts["samplersDefined"] = true; ts["samplerStates[0]"] = "SamplerClampLinear"; ts["vertexColorEnable"] = true; ts.Create(); ts = new SingletonCreator("ShaderData", "BL_ProjectedShadowShaderData"); ts["DXVertexShaderFile"] = "shaders/common/projectedShadowV.hlsl"; ts["DXPixelShaderFile"] = "shaders/common/projectedShadowP.hlsl"; ts["OGLVertexShaderFile"] = "shaders/common/gl/projectedShadowV.glsl"; ts["OGLPixelShaderFile"] = "shaders/common/gl/projectedShadowP.glsl"; ts["pixVersion"] = 2.0; ts.Create(); ts = new SingletonCreator("CustomMaterial", "BL_ProjectedShadowMaterial"); ts["sampler[\"inputTex\"]"] = "$miscbuff"; ts["shader"] = "BL_ProjectedShadowShaderData"; ts["stateBlock"] = "BL_ProjectedShadowSBData"; ts["version"] = 2.0; ts["forwardLit"] = true; ts.Create(); }
public static void initialize() { omni.bGlobal["$CAPostFx::enabled"] = false; // The lens distortion coefficient. omni.dGlobal["$CAPostFx::distCoeffecient"] = -0.05; // The cubic distortion value. omni.dGlobal["$CAPostFx::cubeDistortionFactor"] = -0.1; // The amount and direction of the maxium shift for // the red, green, and blue channels. omni.sGlobal["$CAPostFx::colorDistortionFactor"] = "0.005 -0.005 0.01"; SingletonCreator ts = new SingletonCreator("GFXStateBlockData", "PFX_DefaultChromaticLensStateBlock"); ts["zDefined"] = true; ts["zEnable"] = false; ts["zWriteEnable"] = false; ts["samplersDefined"] = true; ts["samplerStates[0]"] = "SamplerClampPoint"; ts.Create(); ts = new SingletonCreator("ShaderData", "PFX_ChromaticLensShader"); ts["DXVertexShaderFile"] = "shaders/common/postFx/postFxV.hlsl"; ts["DXPixelShaderFile"] = "shaders/common/postFx/chromaticLens.hlsl"; ts["pixVersion"] = 3.0; ts.Create(); ts = new SingletonCreator("PostEffect", "ChromaticLensPostFX", typeof(ChromaticLensPostFX)); ts["renderTime"] = "PFXAfterDiffuse"; ts["renderPriority"] = 0.2; ts["isEnabled"] = false; ts["allowReflectPass"] = false; ts["shader"] = "PFX_ChromaticLensShader"; ts["stateBlock"] = "PFX_DefaultChromaticLensStateBlock"; ts["texture[0]"] = "$backBuffer"; ts["target"] = "$backBuffer"; ts.Create(); }
public static void initialize() { SingletonCreator sc = new SingletonCreator("SFXAmbience", "AudioAmbienceDefault"); sc["environment"] = "AudioEnvOff"; sc.Create(); sc = new SingletonCreator("SFXAmbience", "AudioAmbienceOutside"); sc["environment"] = "AudioEnvPlain"; sc["states[0]"] = "AudioLocationOutside"; sc.Create(); sc = new SingletonCreator("SFXAmbience", "AudioAmbienceInside"); sc["environment"] = "AudioEnvRoom"; sc["states[0]"] = "AudioLocationInside"; sc.Create(); sc = new SingletonCreator("SFXAmbience", "AudioAmbienceUnderwater"); sc["environment"] = "AudioEnvUnderwater"; sc["states[0]"] = "AudioLocationUnderwater"; sc.Create(); }
public static void initialize() { SingletonCreator sc = new SingletonCreator("SFXDescription", "BulletFireDesc : AudioEffect"); sc["isLooping"] = false; sc["is3D"] = true; sc["ReferenceDistance"] = 10.0; sc["MaxDistance"] = 60.0; sc.Create(); sc = new SingletonCreator("SFXDescription", "BulletImpactDesc : AudioEffect"); sc["isLooping"] = false; sc["is3D"] = true; sc["ReferenceDistance"] = 10.0; sc["MaxDistance"] = 30.0; sc["volume"] = 0.4; sc["pitch"] = 1.4; sc.Create(); if (omni.Util.isFile("scripts/client/audioData.cs")) omni.Util.exec("scripts/client/audioData.cs", false, false); }
public static void initialize() { SingletonCreator sc = new SingletonCreator("GFXStateBlockData", "AL_FormatTokenState : PFX_DefaultStateBlock"); sc["samplersDefined"] = true; sc["samplerStates[0]"] = "SamplerClampPoint"; sc.Create(); sc = new SingletonCreator("PostEffect", "AL_FormatCopy"); // This PostEffect is used by 'AL_FormatToken' directly. It is never added to // the PostEffectManager. Do not call enable() on it. sc["isEnabled"] = false; sc["allowReflectPass"] = true; sc["shader"] = "PFX_PassthruShader"; sc["stateBlock"] = "AL_FormatTokenState"; sc["texture[0]"] = "$inTex"; sc["target"] = "$backbuffer"; sc.Create(); }
public static void initialize() { omni.bGlobal["$CAPostFx::enabled"] = false; // The lens distortion coefficient. omni.dGlobal["$CAPostFx::distCoeffecient"] = -0.05; // The cubic distortion value. omni.dGlobal["$CAPostFx::cubeDistortionFactor"] = -0.1; // The amount and direction of the maxium shift for // the red, green, and blue channels. omni.sGlobal["$CAPostFx::colorDistortionFactor"] = "0.005 -0.005 0.01"; SingletonCreator ts = new SingletonCreator("GFXStateBlockData", "PFX_DefaultChromaticLensStateBlock"); ts["zDefined"] = true; ts["zEnable"] = false; ts["zWriteEnable"] = false; ts["samplersDefined"] = true; ts["samplerStates[0]"] = "SamplerClampPoint"; ts.Create(); ts = new SingletonCreator("ShaderData", "PFX_ChromaticLensShader"); ts["DXVertexShaderFile"] = "shaders/common/postFx/postFxV.hlsl"; ts["DXPixelShaderFile"] = "shaders/common/postFx/chromaticLens.hlsl"; ts["pixVersion"] = 3.0; ts.Create(); ts = new SingletonCreator("PostEffect", "ChromaticLensPostFX", typeof (ChromaticLensPostFX)); ts["renderTime"] = "PFXAfterDiffuse"; ts["renderPriority"] = 0.2; ts["isEnabled"] = false; ts["allowReflectPass"] = false; ts["shader"] = "PFX_ChromaticLensShader"; ts["stateBlock"] = "PFX_DefaultChromaticLensStateBlock"; ts["texture[0]"] = "$backBuffer"; ts["target"] = "$backBuffer"; ts.Create(); }
public static void initialize() { omni.console.print("\n--------- Initializing Shadow Filter ---------"); shadowFilter.initialize(); omni.console.print("\n--------- Finished Initializing Shadow Filter ---------"); SingletonCreator ts = new SingletonCreator("GFXStateBlockData", "BL_ProjectedShadowSBData"); ts["blendDefined"] = true; ts["blendEnable"] = true; ts["blendSrc"] = "GFXBlendDestColor"; ts["blendDest"] = "GFXBlendZero"; ts["zDefined"] = true; ts["zEnable"] = true; ts["zWriteEnable"] = false; ts["samplersDefined"] = true; ts["samplerStates[0]"] = "SamplerClampLinear"; ts["vertexColorEnable"] = true; ts.Create(); ts = new SingletonCreator("ShaderData", "BL_ProjectedShadowShaderData"); ts["DXVertexShaderFile"] = "shaders/common/projectedShadowV.hlsl"; ts["DXPixelShaderFile"] = "shaders/common/projectedShadowP.hlsl"; ts["OGLVertexShaderFile"] = "shaders/common/gl/projectedShadowV.glsl"; ts["OGLPixelShaderFile"] = "shaders/common/gl/projectedShadowP.glsl"; ts["pixVersion"] = 2.0; ts.Create(); ts = new SingletonCreator("CustomMaterial", "BL_ProjectedShadowMaterial"); ts["sampler[\"inputTex\"]"] = "$miscbuff"; ts["shader"] = "BL_ProjectedShadowShaderData"; ts["stateBlock"] = "BL_ProjectedShadowSBData"; ts["version"] = 2.0; ts["forwardLit"] = true; ts.Create(); }
public static void initialize() { SingletonCreator sc = new SingletonCreator("ShaderData", "CloudLayerShader"); sc["DXVertexShaderFile"] = "shaders/common/cloudLayerV.hlsl"; sc["DXPixelShaderFile"] = "shaders/common/cloudLayerP.hlsl"; sc["OGLVertexShaderFile"] = "shaders/common/gl/cloudLayerV.glsl"; sc["OGLPixelShaderFile"] = "shaders/common/gl/cloudLayerP.glsl"; sc["pixVersion"] = 2.0; sc.Create(); sc = new SingletonCreator("ShaderData", "BasicCloudsShader"); sc["DXVertexShaderFile"] = "shaders/common/basicCloudsV.hlsl"; sc["DXPixelShaderFile"] = "shaders/common/basicCloudsP.hlsl"; //OGLVertexShaderFile = "shaders/common/gl/basicCloudsV.glsl"; //OGLPixelShaderFile = "shaders/common/gl/basicCloudsP.glsl"; sc["pixVersion"] = 2.0; sc.Create(); }
public static void initialize() { SingletonCreator ts = new SingletonCreator("ShaderData", "PFX_FlashShader"); ts["DXVertexShaderFile"] = "shaders/common/postFx/postFxV.hlsl"; ts["DXPixelShaderFile"] = "shaders/common/postFx/flashP.hlsl"; ts["defines"] = "WHITE_COLOR=float4(1.0,1.0,1.0,0.0);MUL_COLOR=float4(1.0,0.25,0.25,0.0)"; ts["pixVersion"] = 2.0; ts.Create(); ts = new SingletonCreator("PostEffect", "FlashFx", typeof (FlashFxPostEffect)); ts["isEnabled"] = false; ts["allowReflectPass"] = false; ts["renderTime"] = "PFXAfterDiffuse"; ts["shader"] = "PFX_FlashShader"; ts["texture[0]"] = "$backBuffer"; ts["renderPriority"] = 10; ts["stateBlock"] = "PFX_DefaultStateBlock"; ts.Create(); }
public static void initialize() { SingletonCreator ts = new SingletonCreator("PostEffect", "BL_ShadowFilterPostFx", typeof (BL_ShadowFilterPostEffect)); // Blur vertically ts["shader"] = "BL_ShadowFilterShaderV"; ts["stateBlock"] = "PFX_DefaultStateBlock"; //Todo See if there is a way to autodetect this. ts["targetClear"] = "\"PFXTargetClear_OnDraw\""; //No way to easily detect that this belongs in quotes, so gotta toss it in quotes manually. ts["targetClearColor"] = "0 0 0 0"; ts["texture[0]"] = "$inTex"; ts["target"] = "$outTex"; // Blur horizontal ObjectCreator tch = new ObjectCreator("PostEffect"); tch["shader"] = "BL_ShadowFilterShaderH"; tch["stateBlock"] = "PFX_DefaultStateBlock"; tch["texture[0]"] = "$inTex"; tch["target"] = "$outTex"; ts["#1"] = tch; ts.Create(); }