FEDERAÇÃO SIGMA

Assembleia dos fóruns da Federação SIGMA. Em fase experimental.

  • eXtensible Shading Language (.xsh)

    Posted by Veryzon on 2023/10/28 at 03:18:28

    eXtensible Shading Language (.xsh) é um proto-formato de documento XML atualmente em desenvolvimento, projetado para representar infraestruturas de compilação de shaders, pipelines, draw techniques e acessórios de material. Não possui um formato definido porque atualmente serve apenas para o Qwadro ler descritores envolvimento um código GLSL. Futuramente, explanarei mais sobre a proposta.

    • This discussion was modified 6 months ago by  Veryzon.
    Veryzon replied 6 months ago 1 Member · 1 Reply
  • 1 Reply
  • Avatar of veryzon

    Veryzon

    Administrator
    2023/10/28 at 05:52:23

    Proposta inicial.

    <Qwadro>
    <Shader name='vs'>
    <Stage>VERTEX</Stage>
    <Include>data/pipeline/stdEnv.inc</Include>
    <Include>data/pipeline/stdView.inc</Include>
    <Constant id='0' value='64'>NUM_SAMPLES</Constant>
    <Resource type='CONSTANT_BUFFER'>sgl_view</Resource>
    <In format='V3D'>a_xyz</In>
    <![CDATA[
    layout(location = 0) in vec3 a_xyz;
    out block
    {
    vec3 uvw0;
    } sgl_v;
    void main()
    {
    sgl_v.uvw0 = a_xyz;
    vec4 pos = p * v * vec4(a_xyz, 1.0);
    gl_Position = pos.xyww;
    }
    ]]>
    </Shader>
    <Shader name='fs'>
    <Stage>FRAGMENT</Stage>
    <Include>data/pipeline/stdEnv.inc</Include>
    <Resource binding='1' type='COMBINED_IMAGE_SAMPLER'>samp</Resource>
    <Out format='V4D'></Out>
    <![CDATA[
    uniform samplerCube samp;
    in block
    {
    vec3 uvw0;
    } sgl_v;
    out vec4 sgl_rgba;
    void main()
    {
    sgl_rgba = texture(samp, sgl_v.uvw0);
    }
    ]]>
    </Shader>
    <Pipeline>
    <FillMode>SOLID</FillMode>
    <CullMode>BACK</CullMode>
    <FrontFace>CCW</FrontFace>
    <DepthTestEnable>true</DepthTestEnable>
    <DepthWriteEnable>true</DepthWriteEnable>
    <DepthCompareOp>LEQUAL</DepthCompareOp>
    <PrimitiveTopology>TRI_LIST</PrimitiveTopology>
    <Shader>data/pipeline/skybox.xsh.xml?vs</Shader>
    <Shader>data/pipeline/skybox.xsh.xml?fs</Shader>
    </Pipeline>
    <DrawTechnique>
    <Pass>
    <FillMode>SOLID</FillMode>
    <CullMode>BACK</CullMode>
    <FrontFace>CCW</FrontFace>
    <DepthTestEnable>true</DepthTestEnable>
    <DepthWriteEnable>true</DepthWriteEnable>
    <DepthCompareOp>LEQUAL</DepthCompareOp>
    <PrimitiveTopology>TRI_LIST</PrimitiveTopology>
    <Shader>data/pipeline/skybox.xsh.xml?vs</Shader>
    <Shader>data/pipeline/skybox.xsh.xml?fs</Shader>
    </Pass>
    </DrawTechnique>
    </Qwadro>

Log in to reply.

Auto-translate »