当前位置: 首页>>代码示例>>C#>>正文


C# VRageRender.PixelShaderId类代码示例

本文整理汇总了C#中VRageRender.PixelShaderId的典型用法代码示例。如果您正苦于以下问题:C# PixelShaderId类的具体用法?C# PixelShaderId怎么用?C# PixelShaderId使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PixelShaderId类属于VRageRender命名空间,在下文中一共展示了PixelShaderId类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Draw

        public static void Draw(IRtvBindable renderTarget)
        {
            ISrvBindable srvBind = null;
            if (m_selRtvTexture != null)
                srvBind = m_selRtvTexture;
            if (m_selUavTexture != null)
                srvBind = m_selUavTexture;
            if (m_selBorrowedRtvTexture != null)
                srvBind = m_selBorrowedRtvTexture;
            if (m_selBorrowedUavTexture != null)
                srvBind = m_selBorrowedUavTexture;

            if (srvBind == null) // no texture is selected
                return;

            if (m_ps == PixelShaderId.NULL)
                m_ps = MyShaders.CreatePs("Debug/DebugRt.hlsl");

            MyRenderContext RC = MyImmediateRC.RC;
            RC.SetPrimitiveTopology(PrimitiveTopology.TriangleList);
            RC.SetViewport(0, 0, MyRender11.ViewportResolution.X, MyRender11.ViewportResolution.Y);
            RC.SetRtv(renderTarget);
            RC.SetBlendState(null);
            RC.PixelShader.Set(m_ps);
            RC.PixelShader.SetSrv(0, srvBind);
            RC.PixelShader.SetConstantBuffer(MyCommon.FRAME_SLOT, MyCommon.FrameConstants);
            MyScreenPass.DrawFullscreenQuad();

            Deselect();
        }
开发者ID:2asoft,项目名称:SpaceEngineers,代码行数:30,代码来源:MyDebugTextureDisplay.cs

示例2: CreateVertexBuffer

        unsafe void IManagerDevice.OnDeviceInit()
        {
            if (m_markerConstantBuffer == ConstantsBufferId.NULL)
                m_markerConstantBuffer = MyHwBuffers.CreateConstantsBuffer(sizeof(MyMarkerConstants), "MyPostprocessMarkCascades.MarkerConstantBuffer");

            if (m_psMarker == PixelShaderId.NULL)
                m_psMarker = MyShaders.CreatePs("Shadows\\StencilMarker.hlsl");
            if (m_vsMarker == VertexShaderId.NULL)
                m_vsMarker = MyShaders.CreateVs("Shadows\\StencilMarker.hlsl");
            if (m_psDrawCoverage == PixelShaderId.NULL)
                m_psDrawCoverage = MyShaders.CreatePs("Shadows\\CascadeCoverage.hlsl");
            if (m_inputLayout == InputLayoutId.NULL)
                m_inputLayout = MyShaders.CreateIL(m_vsMarker.BytecodeId, MyVertexLayouts.GetLayout(MyVertexInputComponentType.POSITION3));

            m_vertexBuffer = CreateVertexBuffer();
            m_indexBuffer = CreateIndexBuffer();
        }
开发者ID:rem02,项目名称:SpaceEngineers,代码行数:17,代码来源:MyPostprocessMarkCascades.cs

示例3: InitShaders

        private void InitShaders()
        {
            if (m_markVS == VertexShaderId.NULL)
                m_markVS = MyShaders.CreateVs("ShadowsOld/Shape.hlsl");

            if (m_markPS == PixelShaderId.NULL)
                m_markPS = MyShaders.CreatePs("ShadowsOld/Shape.hlsl");

            if (m_inputLayout == InputLayoutId.NULL)
                m_inputLayout = MyShaders.CreateIL(m_markVS.BytecodeId, MyVertexLayouts.GetLayout(MyVertexInputComponentType.POSITION3));

            if (m_combinePS == PixelShaderId.NULL)
                m_combinePS = MyShaders.CreatePs("ShadowsOld/CombineShadows.hlsl");

            m_gatherCS_LD = MyShaders.CreateCs("ShadowsOld/Shadows.hlsl");
            m_gatherCS_MD = MyShaders.CreateCs("ShadowsOld/Shadows.hlsl", new[] { new ShaderMacro("ENABLE_PCF", null) });
            m_gatherCS_HD = MyShaders.CreateCs("ShadowsOld/Shadows.hlsl", new[] { new ShaderMacro("ENABLE_PCF", null), new ShaderMacro("ENABLE_DISTORTION", null) });
        }
开发者ID:2asoft,项目名称:SpaceEngineers,代码行数:18,代码来源:MyShadowCascadesPostProcess.cs

示例4: Init

 internal static void Init()
 {
     m_ps = MyShaders.CreatePs("ForwardPostprocess.hlsl", "apply_skybox");
     m_mipmap = MyShaders.CreateCs("EnvPrefiltering.hlsl", "buildMipmap");
     m_prefilter = MyShaders.CreateCs("EnvPrefiltering.hlsl", "prefilter");
     m_blend = MyShaders.CreateCs("EnvPrefiltering.hlsl", "blend");
 }
开发者ID:fluxit,项目名称:SpaceEngineers,代码行数:7,代码来源:MyEnvProbeProcessing.cs

示例5: Init

        internal static void Init()
        {
            m_buildHistogram = MyShaders.CreateCs("histogram.hlsl", "build_histogram", MyShaderHelpers.FormatMacros("NUMTHREADS 8"));
            m_drawHistogram = MyShaders.CreatePs("data_visualization.hlsl", "display_histogram");

            m_histogram = MyRwTextures.CreateUav1D(512, SharpDX.DXGI.Format.R32_UInt, "histogram");
        }
开发者ID:leandro1129,项目名称:SpaceEngineers,代码行数:7,代码来源:MyLuminanceDebugTools.cs

示例6: Init

        internal static void Init()
        {
            //MyRender11.RegisterSettingsChangedListener(new OnSettingsChangedDelegate(RecreateShadersForSettings));
			m_baseColorShader = MyShaders.CreatePs("debug.hlsl", "base_color");
            m_baseColorLinearShader = MyShaders.CreatePs("debug.hlsl", "base_color_linear");
            m_normalShader = MyShaders.CreatePs("debug.hlsl", "normal");
            m_glossinessShader = MyShaders.CreatePs("debug.hlsl", "glossiness");
            m_metalnessShader = MyShaders.CreatePs("debug.hlsl", "metalness");
            m_matIDShader = MyShaders.CreatePs("debug.hlsl", "mat_id");
            m_aoShader = MyShaders.CreatePs("debug.hlsl", "ambient_occlusion");
            m_emissiveShader = MyShaders.CreatePs("debug.hlsl", "emissive");
            m_ambientDiffuseShader = MyShaders.CreatePs("debug.hlsl", "debug_ambient_diffuse");
            m_ambientSpecularShader = MyShaders.CreatePs("debug.hlsl", "debug_ambient_specular");
            m_edgeDebugShader = MyShaders.CreatePs("debug.hlsl", "debug_edge");
			m_shadowsDebugShader = MyShaders.CreatePs("debug.hlsl", "cascades_shadow", MyRender11.ShaderCascadesNumberHeader());
            m_NDotLShader = MyShaders.CreatePs("debug.hlsl", "NDotL");


            m_screenVertexShader = MyShaders.CreateVs("debug.hlsl", "screenVertex");
            m_blitTextureShader = MyShaders.CreatePs("debug.hlsl", "blitTexture");
            m_blitTexture3DShader = MyShaders.CreatePs("debug.hlsl", "blitTexture3D");
            m_blitTextureArrayShader = MyShaders.CreatePs("debug.hlsl", "blitTextureArray");
            m_inputLayout = MyShaders.CreateIL(m_screenVertexShader.BytecodeId, MyVertexLayouts.GetLayout(MyVertexInputComponentType.POSITION2, MyVertexInputComponentType.TEXCOORD0));

            m_quadBuffer = MyHwBuffers.CreateVertexBuffer(6, MyVertexFormatPosition2Texcoord.STRIDE, BindFlags.VertexBuffer, ResourceUsage.Dynamic);
        }
开发者ID:fluxit,项目名称:SpaceEngineers,代码行数:26,代码来源:MyDebugRenderer.cs

示例7: Init

        public static void Init()
        {
            m_buildHistogram = MyShaders.CreateCs("Debug/Histogram.hlsl", new[] { new ShaderMacro("NUMTHREADS", 8) });
            m_drawHistogram = MyShaders.CreatePs("Debug/DataVisualizationHistogram.hlsl");

            m_psDisplayHdrIntensity = MyShaders.CreatePs("Debug/DisplayHdrIntensity.hlsl");
        }
开发者ID:2asoft,项目名称:SpaceEngineers,代码行数:7,代码来源:MyHdrDebugTools.cs

示例8: Init

        internal static void Init()
        {
            //MyRender11.RegisterSettingsChangedListener(new OnSettingsChangedDelegate(RecreateShadersForSettings));
            m_screenVertexShader = MyShaders.CreateVs("debug_base_color.hlsl");
            m_baseColorShader = MyShaders.CreatePs("debug_base_color.hlsl");
            m_baseColorLinearShader = MyShaders.CreatePs("debug_base_color_linear.hlsl");
            m_normalShader = MyShaders.CreatePs("debug_normal.hlsl");
            m_glossinessShader = MyShaders.CreatePs("debug_glossiness.hlsl");
            m_metalnessShader = MyShaders.CreatePs("debug_metalness.hlsl");
            m_matIDShader = MyShaders.CreatePs("debug_mat_id.hlsl");
            m_aoShader = MyShaders.CreatePs("debug_ambient_occlusion.hlsl");
            m_emissiveShader = MyShaders.CreatePs("debug_emissive.hlsl");
            m_ambientDiffuseShader = MyShaders.CreatePs("debug_ambient_diffuse.hlsl");
            m_ambientSpecularShader = MyShaders.CreatePs("debug_ambient_specular.hlsl");
            m_edgeDebugShader = MyShaders.CreatePs("debug_edge.hlsl");
            m_shadowsDebugShader = MyShaders.CreatePs("debug_cascades_shadow.hlsl");
            m_NDotLShader = MyShaders.CreatePs("debug_NDotL.hlsl");
            m_depthShader = MyShaders.CreatePs("debug_Depth.hlsl");
            m_stencilShader = MyShaders.CreatePs("debug_Stencil.hlsl");

            m_blitTextureShader = MyShaders.CreatePs("debug_blitTexture.hlsl");
            m_blitTexture3DShader = MyShaders.CreatePs("debug_blitTexture3D.hlsl");
            m_blitTextureArrayShader = MyShaders.CreatePs("debug_blitTextureArray.hlsl");
            m_inputLayout = MyShaders.CreateIL(m_screenVertexShader.BytecodeId, MyVertexLayouts.GetLayout(MyVertexInputComponentType.POSITION2, MyVertexInputComponentType.TEXCOORD0));

            m_quadBuffer = MyHwBuffers.CreateVertexBuffer(6, MyVertexFormatPosition2Texcoord.STRIDE, BindFlags.VertexBuffer, ResourceUsage.Dynamic, null, "MyDebugRenderer quad");
        }
开发者ID:Chrus,项目名称:SpaceEngineers,代码行数:27,代码来源:MyDebugRenderer.cs

示例9: Init

        internal static void Init()
        {
            //MyRender11.RegisterSettingsChangedListener(new OnSettingsChangedDelegate(RecreateShadersForSettings));
            m_screenVertexShader = MyShaders.CreateVs("Debug/DebugBaseColor.hlsl");
            m_baseColorShader = MyShaders.CreatePs("Debug/DebugBaseColor.hlsl");
            m_albedoShader = MyShaders.CreatePs("Debug/DebugAlbedo.hlsl");
            m_normalShader = MyShaders.CreatePs("Debug/DebugNormal.hlsl");
            m_normalViewShader = MyShaders.CreatePs("Debug/DebugNormalView.hlsl");
            m_glossinessShader = MyShaders.CreatePs("Debug/DebugGlossiness.hlsl");
            m_metalnessShader = MyShaders.CreatePs("Debug/DebugMetalness.hlsl");
            m_aoShader = MyShaders.CreatePs("Debug/DebugAmbientOcclusion.hlsl");
            m_emissiveShader = MyShaders.CreatePs("Debug/DebugEmissive.hlsl");
            m_ambientDiffuseShader = MyShaders.CreatePs("Debug/DebugAmbientDiffuse.hlsl");
            m_ambientSpecularShader = MyShaders.CreatePs("Debug/DebugAmbientSpecular.hlsl");
            m_edgeDebugShader = MyShaders.CreatePs("Debug/DebugEdge.hlsl");
            m_shadowsDebugShader = MyShaders.CreatePs("Debug/DebugCascadesShadow.hlsl");
            m_NDotLShader = MyShaders.CreatePs("Debug/DebugNDotL.hlsl");
            m_LODShader = MyShaders.CreatePs("Debug/DebugLOD.hlsl");
            m_depthShader = MyShaders.CreatePs("Debug/DebugDepth.hlsl");
            m_stencilShader = MyShaders.CreatePs("Debug/DebugStencil.hlsl");
            m_rtShader = MyShaders.CreatePs("Debug/DebugRt.hlsl");

            m_blitTextureShader = MyShaders.CreatePs("Debug/DebugBlitTexture.hlsl");
            m_blitTexture3DShader = MyShaders.CreatePs("Debug/DebugBlitTexture3D.hlsl");
            m_blitTextureArrayShader = MyShaders.CreatePs("Debug/DebugBlitTextureArray.hlsl");
            m_inputLayout = MyShaders.CreateIL(m_screenVertexShader.BytecodeId, MyVertexLayouts.GetLayout(MyVertexInputComponentType.POSITION2, MyVertexInputComponentType.TEXCOORD0));

            m_quadBuffer = MyManagers.Buffers.CreateVertexBuffer(
                "MyDebugRenderer quad", 6, MyVertexFormatPosition2Texcoord.STRIDE,
                usage: ResourceUsage.Dynamic);
        }
开发者ID:2asoft,项目名称:SpaceEngineers,代码行数:31,代码来源:MyDebugRenderer.cs

示例10: Init

        internal static void Init()
        {
            //m_copyPs = MyShaders.CreatePs("postprocess.hlsl", "copy");
            //m_clearAlphaPs = MyShaders.CreatePs("postprocess.hlsl", "clear_alpha");

            m_blurH = MyShaders.CreatePs("blur.hlsl", "blur_h", MyShaderHelpers.FormatMacros(MyRender11.ShaderSampleFrequencyDefine()));
            m_blurV = MyShaders.CreatePs("blur.hlsl", "blur_v");
        }
开发者ID:fluxit,项目名称:SpaceEngineers,代码行数:8,代码来源:MyOutline.cs

示例11: Init

 internal static void Init()
 {
     m_ps = MyShaders.CreatePs("EnvProbe/ForwardPostprocess.hlsl");
     m_atmosphere = MyShaders.CreatePs("EnvProbe/AtmospherePostprocess.hlsl");
     m_mipmap = MyShaders.CreateCs("EnvProbe/EnvPrefilteringMipmap.hlsl");
     m_prefilter = MyShaders.CreateCs("EnvProbe/EnvPrefiltering.hlsl");
     m_blend = MyShaders.CreateCs("EnvProbe/EnvPrefilteringBlend.hlsl");
 }
开发者ID:rem02,项目名称:SpaceEngineers,代码行数:8,代码来源:MyEnvProbeProcessing.cs

示例12: Init

        internal static void Init()
        {
            m_buildHistogram = MyShaders.CreateCs("histogram.hlsl", new[] { new ShaderMacro("NUMTHREADS", 8) });
            m_drawHistogram = MyShaders.CreatePs("data_visualization_histogram.hlsl");
            m_drawTonemapping = MyShaders.CreatePs("data_visualization_tonemapping.hlsl");

            m_histogram = MyRwTextures.CreateUav1D(513, SharpDX.DXGI.Format.R32_UInt, "histogram");
        }
开发者ID:stanhebben,项目名称:SpaceEngineers,代码行数:8,代码来源:MyLuminanceDebugTools.cs

示例13: Init

        // inscatter texture
        // transmittance texture
        //static RwTexId m_transmittanceLut;
        //static RwTexId m_inscatterLutR;
        //static RwTexId m_inscatterLutM;

        internal static void Init()
        {
            m_ps = MyShaders.CreatePs("Transparent/Atmosphere/Atmosphere.hlsl");
            m_psPerSample = MyShaders.CreatePs("Transparent/Atmosphere/Atmosphere.hlsl", MyRender11.ShaderSampleFrequencyDefine());

            m_precomputeDensity = MyShaders.CreateCs("Transparent/Atmosphere/AtmospherePrecompute.hlsl");

            m_proxyVs = MyShaders.CreateVs("Transparent/Atmosphere/Atmosphere.hlsl");
            m_proxyIL = MyShaders.CreateIL(m_proxyVs.BytecodeId, MyVertexLayouts.GetLayout(MyVertexInputComponentType.POSITION_PACKED));
        }
开发者ID:rem02,项目名称:SpaceEngineers,代码行数:16,代码来源:MyAtmosphere.cs

示例14: Init

        //internal static void CreateInputLayout(byte[] bytecode)
        //{
        //    m_inputLayout = MyVertexInputLayout.CreateLayout(MyVertexInputLayout.Empty().Append(MyVertexInputComponentType.POSITION3).Append(MyVertexInputComponentType.COLOR4), bytecode);
        //}

        internal unsafe static void Init()
        {
            m_currentBufferSize = 100000;

            m_VB = MyHwBuffers.CreateVertexBuffer(m_currentBufferSize, sizeof(MyVertexFormatPositionColor), BindFlags.VertexBuffer, ResourceUsage.Dynamic);

            m_vs = MyShaders.CreateVs("primitive.hlsl", "vs");
            m_ps = MyShaders.CreatePs("primitive.hlsl", "ps");
            m_inputLayout = MyShaders.CreateIL(m_vs.BytecodeId, MyVertexLayouts.GetLayout(MyVertexInputComponentType.POSITION3, MyVertexInputComponentType.COLOR4));
        }
开发者ID:fluxit,项目名称:SpaceEngineers,代码行数:15,代码来源:MyPrimitivesRenderer.cs

示例15: Init

        internal static void Init()
        {
            m_vs = MyShaders.CreateVs("decal.hlsl");
            var normalMapMacro = new ShaderMacro("USE_NORMALMAP_DECAL", null);
            var colorMapMacro = new ShaderMacro("USE_COLORMAP_DECAL", null);
            m_psColorMap = MyShaders.CreatePs("decal.hlsl", new ShaderMacro[] { colorMapMacro, new ShaderMacro("USE_DUAL_SOURCE_BLENDING", null) });
            m_psNormalMap = MyShaders.CreatePs("decal.hlsl", new ShaderMacro[] { normalMapMacro });
            m_psNormalColorMap = MyShaders.CreatePs("decal.hlsl", new ShaderMacro[] { normalMapMacro, colorMapMacro });

            InitIB();
        }
开发者ID:ales-vilchytski,项目名称:SpaceEngineers,代码行数:11,代码来源:MyScreenDecals.cs


注:本文中的VRageRender.PixelShaderId类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。