Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix nightly for BN #13178

Merged
merged 1 commit into from
Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/dev/core/src/Engines/nativeEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,7 @@ export class NativeEngine extends Engine {

this._webGLVersion = 2;
this.disableUniformBuffers = true;
this._shaderPlatformName = "NATIVE";

// TODO: Initialize this more correctly based on the hardware capabilities.
// Init caps
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifdef NUM_SAMPLES
#if NUM_SAMPLES > 0

#if defined(WEBGL2) || defined(WEBGPU)
#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)
// https://learnopengl.com/PBR/IBL/Specular-IBL
// Hammersley
float radicalInverse_VdC(uint bits)
Expand Down Expand Up @@ -184,7 +184,7 @@
float dim0 = filteringInfo.x;
float omegaP = (4. * PI) / (6. * dim0 * dim0);

#if defined(WEBGL2) || defined(WEBGPU)
#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)
for(uint i = 0u; i < NUM_SAMPLES; ++i)
#else
for(int i = 0; i < NUM_SAMPLES; ++i)
Expand Down Expand Up @@ -243,7 +243,7 @@
float omegaP = (4. * PI) / (6. * dim0 * dim0);

float weight = 0.;
#if defined(WEBGL2) || defined(WEBGPU)
#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)
for(uint i = 0u; i < NUM_SAMPLES; ++i)
#else
for(int i = 0; i < NUM_SAMPLES; ++i)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ vec3 toLinearSpaceExact(vec3 color)
{
vec3 nearZeroSection = 0.0773993808 * color;
vec3 remainingSection = pow(0.947867299 * (color + vec3(0.055)), vec3(2.4));
#if defined(WEBGL2) || defined(WEBGPU)
#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)
return mix(remainingSection, nearZeroSection, lessThanEqual(color, vec3(0.04045)));
#else
return
Expand All @@ -68,7 +68,7 @@ vec3 toGammaSpaceExact(vec3 color)
{
vec3 nearZeroSection = 12.92 * color;
vec3 remainingSection = 1.055 * pow(color, vec3(0.41666)) - vec3(0.055);
#if defined(WEBGL2) || defined(WEBGPU)
#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)
return mix(remainingSection, nearZeroSection, lessThanEqual(color, vec3(0.0031308)));
#else
return
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#if defined(WEBGL2) || defined(WEBGPU)
#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)
layout(location = 0) out vec4 glFragData[{X}];
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifdef SHADOWS
#if defined(WEBGL2) || defined(WEBGPU)
#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)
#define TEXTUREFUNC(s, c, l) texture2DLodEXT(s, c, l)
#else
#define TEXTUREFUNC(s, c, b) texture2D(s, c, b)
Expand Down Expand Up @@ -119,7 +119,7 @@
return esm;
}

#if defined(WEBGL2) || defined(WEBGPU)
#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)
#define inline
float computeShadowCSM(float layer, vec4 vPositionFromLight, float depthMetric, highp sampler2DArray shadowSampler, float darkness, float frustumEdgeFalloff)
{
Expand Down Expand Up @@ -261,7 +261,7 @@
#define ZINCLIP uvDepth.z
#endif

#if defined(WEBGL2) || defined(WEBGPU)
#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)
#define GREATEST_LESS_THAN_ONE 0.99999994

// Shadow PCF kernel size 1 with a single tap (lowest quality)
Expand Down
2 changes: 1 addition & 1 deletion packages/dev/core/src/Shaders/fxaa.fragment.fx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if defined(WEBGL2) || defined(WEBGPU)
#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)
#define TEXTUREFUNC(s, c, l) texture2DLodEXT(s, c, l)
#else
#define TEXTUREFUNC(s, c, b) texture2D(s, c, b)
Expand Down
2 changes: 1 addition & 1 deletion packages/dev/core/src/Shaders/spriteMap.fragment.fx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if defined(WEBGL2) || defined(WEBGPU)
#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)
#define TEXTUREFUNC(s, c, l) texture2DLodEXT(s, c, l)
#else
#define TEXTUREFUNC(s, c, b) texture2D(s, c, b)
Expand Down