Ignore:
Timestamp:
Jul 8, 2012, 12:25:52 AM (9 years ago)
Author:
sam
Message:

core: start working on a higher level LolFx compiler based on the latest
GLSL grammar and some personal attempts at writing an HLSL grammar.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gpu/testmaterial.lolfx

    r1407 r1590  
    3333
    3434        // Ye old way
    35         vertexshader = ...
    36         geometryshader = ...
    37         pixelshader = ...
     35        vertexshader = blah;
     36        geometryshader = blah;
     37        pixelshader = blah;
    3838
    3939        // Ogre crap
    4040
    4141        // The D3D11 way, but we must make it work with GLSL too
    42         SetBlendState(AdditiveBlending, float4(0.0f, 0.0f, 0.0f, 0.0f), 0xFFFFFFFF);
    43         SetDepthStencilState(DisableDepth, 0);
    44         SetRasterizerState()
     42        //SetBlendState(AdditiveBlending, float4(0.0f, 0.0f, 0.0f, 0.0f), 0xFFFFFFFF);
     43        //SetDepthStencilState(DisableDepth, 0);
     44        //SetRasterizerState()
    4545
    46         SetVertexShader
    47         SetDomainShader
    48         SetHullShader
    49         SetGeometryShader
    50         SetPixelShader
    51         SetComputeShader /* WTF? */
     46        //SetVertexShader
     47        //SetDomainShader
     48        //SetHullShader
     49        //SetGeometryShader
     50        //SetPixelShader
     51        //SetComputeShader /* WTF? */
    5252
    53         SetRenderTargets(RTV0, DSV);
    54         SetRenderTargets(RTV0, RTV1, DSV);
    55         ...
    56         SetRenderTargets(RTV0, RTV1, RTV2, RTV3, RTV4, RTV5, RTV6, RTV7, DSV);
     53        //SetRenderTargets(RTV0, DSV);
     54        //SetRenderTargets(RTV0, RTV1, DSV);
     55        //...
     56        //SetRenderTargets(RTV0, RTV1, RTV2, RTV3, RTV4, RTV5, RTV6, RTV7, DSV);
    5757    }
    5858
     
    6161        // Autres vertex/pixel shaders avec éventuellement des
    6262        // dépendances sur le résultat des passes précédentes
    63         vertexshader = ...
     63        vertexshader = something_else;
    6464    }
    6565}
     
    6767/* Defines GLSL shader "Prout" */
    6868
    69 #section GLSL.Prout
     69#pragma lolfx vertexshader(lang=GLSL 1.20, name=prout)
    7070
    7171#version 120
    7272
    7373/* Valid with my GLSL compiler */
    74 #pragma lolfx semantic(in_Vertex, POSITION)
    75 #pragma lolfx semantic(in_Normal, NORMAL)
    76 #pragma lolfx semantic(in_Color, COLOR)
     74//#pragma lolfx semantic(in_Vertex, POSITION)
     75//#pragma lolfx semantic(in_Normal, NORMAL)
     76//#pragma lolfx semantic(in_Color, COLOR)
    7777attribute vec3 in_Vertex;
    7878attribute vec3 in_Normal;
     
    8181void main(void)
    8282{
    83     ...
     83    /* ... */
    8484}
    8585
    8686/* Defines GLSL shader "Zob" */
    87 
    88 #section GLSL.Zob
     87#pragma lolfx vertexshader(lang=GLSL 1.20, name=zob)
    8988
    9089void main(void)
    9190{
    92     shit fuck fuck shit;
     91    shit(); fuck(); fuck(); shit();
    9392}
    9493
    95 /* Defines HLSL shader "Prout" */
     94/* Defines HLSL vertex shader "Prout" */
    9695
    97 #section HLSL.Prout
     96#pragma lolfx vertexshader(lang=HLSL, name=prout)
    9897
    9998void main(void)
Note: See TracChangeset for help on using the changeset viewer.