Skip to content

Commit be66535

Browse files
committed
rn needs round
1 parent 2a562b2 commit be66535

7 files changed

+13
-31
lines changed

dist/shader-park-core.cjs.js

+4-4
Large diffs are not rendered by default.

dist/shader-park-core.esm.js

+4-4
Large diffs are not rendered by default.

dist/shader-park-core.umd.js

+4-4
Large diffs are not rendered by default.

glsl/glsl-lib.js

-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ void main(void) {
3434
}`;
3535

3636
export const threeHeader = `
37-
#define GLSL_NEED_ROUND
3837
uniform mat4 projectionMatrix;
3938
uniform sampler2D msdf;
4039
@@ -45,7 +44,6 @@ varying vec3 sculptureCenter;
4544

4645
export const minimalHeader = `
4746
precision highp float;
48-
#define GLSL_NEED_ROUND
4947
uniform mat4 projectionMatrix;
5048
varying vec3 sculptureCenter;
5149
#define cameraPosition vec3(0.0,0.0,-2.0)

targets/rawSDF4Meshing.js

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export function sculptToRawSDF4Meshing(source) {
1515

1616
const minimalHeader = `
1717
precision highp float;
18-
#define GLSL_NEED_ROUND
1918
uniform float w_width;
2019
uniform float w_height;
2120
uniform mat4 projectionMatrix;

targets/touchDesigner.js

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ in Vertex
3737
} iVert;
3838
3939
#define sculptureCenter iVert.sculptureCenter;
40-
#define GLSL_NEED_ROUND
4140
#define worldPos iVert.worldSpacePos
4241
layout(location = 0) out vec4 oFragColor[TD_NUM_COLOR_BUFFERS];
4342
out float depthTexture;

targets/unrealStart.hlsl

+1-15
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ uniform float2 resolution;
77

88

99
precision highp float;
10-
#define GLSL_NEED_ROUND
1110
// uniform mat4 projectionMatrix;
1211
// varying float3 sculptureCenter;
1312

@@ -46,20 +45,7 @@ float ncos(float x) {
4645
return cos(x)*0.5+0.5;
4746
}
4847

49-
#ifdef GLSL_NEED_ROUND
50-
float round(float x) {
51-
return floor(x+0.5);
52-
}
53-
float2 round(float2 x) {
54-
return floor(x+0.5);
55-
}
56-
float3 round(float3 x) {
57-
return floor(x+0.5);
58-
}
59-
float4 round(float4 x) {
60-
return floor(x+0.5);
61-
}
62-
#endif
48+
6349

6450
float softSquare(float x, int pw) {
6551
return 1.0/(pow(tan(x),float(pw+1)*2.0)+1.0);

0 commit comments

Comments
 (0)