summaryrefslogtreecommitdiff
path: root/examples/lightmap
diff options
context:
space:
mode:
authorjussi2023-11-16 22:37:28 +0200
committerjussi2023-11-16 22:37:28 +0200
commit5c8324d25f5f3500d5258f599afc710352611513 (patch)
treefa92484c2aeabc7b7d66b53f12dd1e9c5c984652 /examples/lightmap
parent118a1f3a8bc468077fdd8bac4d46c452965ce283 (diff)
downloadreilua-enhanced-5c8324d25f5f3500d5258f599afc710352611513.tar.gz
reilua-enhanced-5c8324d25f5f3500d5258f599afc710352611513.tar.bz2
reilua-enhanced-5c8324d25f5f3500d5258f599afc710352611513.zip
Lightmap 100 and 120 shaders. Snake and platformer example refining.
Diffstat (limited to 'examples/lightmap')
-rw-r--r--examples/lightmap/main.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/lightmap/main.lua b/examples/lightmap/main.lua
index 56b6772..f350c0a 100644
--- a/examples/lightmap/main.lua
+++ b/examples/lightmap/main.lua
@@ -4,6 +4,9 @@ Cam3D = require( "camera3d" )
local PLANE_SIZE = 8
+local GLSL_VERSION = "330" -- PLATFORM_DESKTOP
+-- local GLSL_VERSION = "100" -- PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
+
local monitor = 0
local camera = {}
local tileTexture = nil
@@ -52,10 +55,8 @@ function RL.init()
lightmap = RL.LoadTexture( RL.GetBasePath().."../resources/images/lightmap.png" )
RL.SetTextureFilter( lightmap, RL.TEXTURE_FILTER_TRILINEAR )
- shader = RL.LoadShader( RL.GetBasePath().."../resources/shaders/glsl330/lightmap.vs",
- RL.GetBasePath().."../resources/shaders/glsl330/lightmap.fs" )
-
- print( "shader", shader )
+ shader = RL.LoadShader( RL.GetBasePath().."../resources/shaders/glsl"..GLSL_VERSION.."/lightmap.vs",
+ RL.GetBasePath().."../resources/shaders/glsl"..GLSL_VERSION.."/lightmap.fs" )
local materialData = {
shader = shader,
@@ -79,7 +80,6 @@ function RL.init()
},
}
material = RL.CreateMaterial( materialData )
-
matrix = RL.MatrixMultiply( RL.MatrixIdentity(), RL.MatrixTranslate( { -4, 0, -4 } ) )
end