Fix safari (webgl1) compatibility problem

This commit is contained in:
Blue (Lukas Rieger) 2021-03-21 13:35:59 +01:00
parent 3a7b8aef59
commit 0727559aa1
No known key found for this signature in database
GPG Key ID: 904C4995F9E1F800
2 changed files with 8 additions and 0 deletions

View File

@ -27,6 +27,10 @@ import { ShaderChunk } from 'three';
export const HIRES_FRAGMENT_SHADER = `
${ShaderChunk.logdepthbuf_pars_fragment}
#ifndef texture
#define texture texture2D
#endif
uniform sampler2D textureImage;
uniform float sunlightStrength;
uniform float ambientLight;

View File

@ -27,6 +27,10 @@ import { ShaderChunk } from 'three';
export const LOWRES_FRAGMENT_SHADER = `
${ShaderChunk.logdepthbuf_pars_fragment}
#ifndef texture
#define texture texture2D
#endif
struct TileMap {
sampler2D map;
float size;