From 55a195d931aa6909baf5a7c9b7e7108dabdd7764 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 21 May 2012 21:25:26 +0000 Subject: [PATCH] gpu: irrelevant tweaks to a test material file. --- src/gpu/testmaterial.lolfx | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/src/gpu/testmaterial.lolfx b/src/gpu/testmaterial.lolfx index a2a0769e..b96a5c9d 100644 --- a/src/gpu/testmaterial.lolfx +++ b/src/gpu/testmaterial.lolfx @@ -2,8 +2,12 @@ * LolFx Test Material */ -technique Foo // can have lots of different techniques in a single lolfx file +// Can have lots of different techniques in a single lolfx file, +// especially if they share common shader code. +technique Foo { + // Multiple passes, with alpha on/off, with various blending methods, + // with depth test disabled... pass p0 { texture[0] = null; @@ -33,12 +37,10 @@ technique Foo // can have lots of different techniques in a single lolfx file pixelshader = ... // Ogre crap + + // The D3D11 way, but we must make it work with GLSL too SetBlendState(AdditiveBlending, float4(0.0f, 0.0f, 0.0f, 0.0f), 0xFFFFFFFF); SetDepthStencilState(DisableDepth, 0); - - // D3D11 way - SetBlendState() - SetDepthStencilState() SetRasterizerState() SetVertexShader @@ -62,7 +64,9 @@ technique Foo // can have lots of different techniques in a single lolfx file } } --- GLSL.Vert -- +/* Defines GLSL shader "Prout" */ + +#section GLSL.Prout #version 120 @@ -79,3 +83,21 @@ void main(void) ... } +/* Defines GLSL shader "Zob" */ + +#section GLSL.Zob + +void main(void) +{ + shit fuck fuck shit; +} + +/* Defines HLSL shader "Prout" */ + +#section HLSL.Prout + +void main(void) +{ + /* Blah */ +} +