From f18375afa2dbdab05a345eb09c34ca91f33d8c8f Mon Sep 17 00:00:00 2001 From: Donovan Hutchence Date: Tue, 21 May 2024 11:57:42 +0100 Subject: [PATCH] webgl1 examples correctly flagged --- .../examples/graphics/contact-hardening-shadows.example.mjs | 1 + examples/src/examples/graphics/grab-pass.shader.frag | 6 ++++-- examples/src/examples/loaders/gsplat-many.example.mjs | 2 ++ examples/src/examples/loaders/gsplat.example.mjs | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/examples/src/examples/graphics/contact-hardening-shadows.example.mjs b/examples/src/examples/graphics/contact-hardening-shadows.example.mjs index 8bc5cb5759e..3acaf90ae46 100644 --- a/examples/src/examples/graphics/contact-hardening-shadows.example.mjs +++ b/examples/src/examples/graphics/contact-hardening-shadows.example.mjs @@ -1,4 +1,5 @@ // @config WEBGPU_DISABLED +// @config WEBGL1_DISABLED import * as pc from 'playcanvas'; import { data } from '@examples/observer'; import { deviceType, rootPath } from '@examples/utils'; diff --git a/examples/src/examples/graphics/grab-pass.shader.frag b/examples/src/examples/graphics/grab-pass.shader.frag index 171ff3a851a..7d13c8f4c88 100644 --- a/examples/src/examples/graphics/grab-pass.shader.frag +++ b/examples/src/examples/graphics/grab-pass.shader.frag @@ -37,8 +37,10 @@ void main(void) vec3 grabColor = texture2DLodEXT(uSceneColorMap, grabUv + offset, mipmap).rgb; // tint the material based on mipmap - float tintIndex = clamp(mipmap, 0.0, 3.0); - grabColor *= tints[int(tintIndex)]; + #ifdef GL2 + float tintIndex = clamp(mipmap, 0.0, 3.0); + grabColor *= tints[int(tintIndex)]; + #endif // brighten the refracted texture a little bit // brighten even more the rough parts of the glass diff --git a/examples/src/examples/loaders/gsplat-many.example.mjs b/examples/src/examples/loaders/gsplat-many.example.mjs index 2d9f0076a7a..bfa4fa7c23c 100644 --- a/examples/src/examples/loaders/gsplat-many.example.mjs +++ b/examples/src/examples/loaders/gsplat-many.example.mjs @@ -1,3 +1,5 @@ +// @config WEBGL1_DISABLED + import * as pc from 'playcanvas'; import { data } from '@examples/observer'; import files from '@examples/files'; diff --git a/examples/src/examples/loaders/gsplat.example.mjs b/examples/src/examples/loaders/gsplat.example.mjs index 926e21b0a84..c61befab40e 100644 --- a/examples/src/examples/loaders/gsplat.example.mjs +++ b/examples/src/examples/loaders/gsplat.example.mjs @@ -1,3 +1,5 @@ +// @config WEBGL1_DISABLED + import * as pc from 'playcanvas'; import { deviceType, rootPath } from '@examples/utils';