@@ -235,7 +235,9 @@ void light_compute(
235
235
m_var = 0.662002687 * S1 + 0.684122060 * S2 - 0.323583601 * S3 - 0.0225411470 * m_var;\
236
236
}
237
237
*/
238
+ #ifndef VITA_ENABLED
238
239
#define SRGB_APPROX(m_var)
240
+ #endif // VITA_ENABLED
239
241
240
242
float NdotL = dot (N, L);
241
243
float cNdotL = max (NdotL, 0.0 ); // clamped NdotL
@@ -272,7 +274,9 @@ void light_compute(
272
274
diffuse_brdf_NL = cNdotL * (1.0 / M_PI);
273
275
#endif
274
276
277
+ #ifndef VITA_ENABLED
275
278
SRGB_APPROX(diffuse_brdf_NL)
279
+ #endif // VITA_ENABLED
276
280
277
281
diffuse_interp += light_color * diffuse_brdf_NL * attenuation;
278
282
@@ -757,22 +761,26 @@ VERTEX_SHADER_CODE
757
761
758
762
// texture2DLodEXT and textureCubeLodEXT are fragment shader specific.
759
763
// Do not copy these defines in the vertex section.
764
+ #ifndef VITA_ENABLED
765
+
760
766
#ifndef USE_GLES_OVER_GL
761
767
#ifdef GL_EXT_shader_texture_lod
762
768
#extension GL_EXT_shader_texture_lod : enable
763
769
#define texture2DLod (img, coord, lod) texture2DLodEXT(img, coord, lod)
764
770
#define textureCubeLod (img, coord, lod) textureCubeLodEXT(img, coord, lod)
765
- #endif
771
+ #endif // GL_EXT_shader_texture_lod
766
772
#endif // !USE_GLES_OVER_GL
767
773
768
774
#ifdef GL_ARB_shader_texture_lod
769
775
#extension GL_ARB_shader_texture_lod : enable
770
- #endif
776
+ #endif // GL_ARB_shader_texture_lod
771
777
772
- #if ! defined(GL_EXT_shader_texture_lod) && ! defined(GL_ARB_shader_texture_lod)
778
+ #endif // !VITA_ENABLED
779
+
780
+ #if (! defined(GL_EXT_shader_texture_lod) && ! defined(GL_ARB_shader_texture_lod)) || defined(VITA_ENABLED)
773
781
#define texture2DLod (img, coord, lod) texture2D (img, coord, lod)
774
782
#define textureCubeLod (img, coord, lod) textureCube (img, coord, lod)
775
- #endif
783
+ #endif // (!GL_EXT_shader_texture_lod && !GL_ARB_shader_texture_lod) || VITA_ENABLED
776
784
777
785
#ifdef USE_GLES_OVER_GL
778
786
#define lowp
@@ -1320,7 +1328,9 @@ void light_compute(
1320
1328
m_var = 0.662002687 * S1 + 0.684122060 * S2 - 0.323583601 * S3 - 0.0225411470 * m_var;\
1321
1329
}
1322
1330
*/
1331
+ #ifndef VITA_ENABLED
1323
1332
#define SRGB_APPROX(m_var)
1333
+ #endif // VITA_ENABLED
1324
1334
1325
1335
#if defined(USE_LIGHT_SHADER_CODE)
1326
1336
// light is written by the light shader
@@ -1413,7 +1423,9 @@ LIGHT_SHADER_CODE
1413
1423
diffuse_brdf_NL = cNdotL * (1.0 / M_PI);
1414
1424
#endif
1415
1425
1426
+ #ifndef VITA_ENABLED
1416
1427
SRGB_APPROX(diffuse_brdf_NL)
1428
+ #endif // VITA_ENABLED
1417
1429
1418
1430
diffuse_light += light_color * diffuse_color * diffuse_brdf_NL * attenuation;
1419
1431
@@ -1493,7 +1505,9 @@ LIGHT_SHADER_CODE
1493
1505
1494
1506
#endif
1495
1507
1508
+ #ifndef VITA_ENABLED
1496
1509
SRGB_APPROX(specular_brdf_NL)
1510
+ #endif // VITA_ENABLED
1497
1511
specular_light += specular_brdf_NL * light_color * specular_blob_intensity * attenuation;
1498
1512
1499
1513
#if defined(LIGHT_USE_CLEARCOAT)
0 commit comments