Browse Source

Make VERTEX/PIXEL shader defines result in themselves

This means you can use VERTEX or PIXEL in your shader code without them
disappearing (and getting a vague error). It's still not necessarily a good
idea to use them as names, but at least it doesn't mysteriously break now.

--HG--
branch : minor
Bart van Strien 7 years ago
parent
commit
ba1d4dc0e9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/modules/graphics/wrap_Graphics.lua

+ 1 - 1
src/modules/graphics/wrap_Graphics.lua

@@ -306,7 +306,7 @@ local function createShaderStageCode(stage, code, lang, gles, glsl1on3, gammacor
 	stage = stage:upper()
 	local lines = {
 		GLSL.VERSION[lang][gles],
-		"#define "..stage,
+		"#define " ..stage .. " " .. stage,
 		glsl1on3 and "#define LOVE_GLSL1_ON_GLSL3 1" or "",
 		gammacorrect and "#define LOVE_GAMMA_CORRECT 1" or "",
 		GLSL.SYNTAX,