const float to highp 4-component vector of float
I have tried your ts branch but cannot figure out how to fix this error.
I get it for example with gasGiantRing.js and starPlanet.js.
#edit: Same goes for the main branch.
Program Info Log:
FRAGMENT
ERROR: 0:152: 'texture' : no matching overloaded function found
ERROR: 0:152: 'assign' : cannot convert from 'const float' to 'highp 4-component vector of float'
ERROR: 0:154: 'texture' : no matching overloaded function found
ERROR: 0:154: 'assign' : cannot convert from 'const float' to 'highp 4-component vector of float'
147:
148: // finally add colors
149: float posterized = floor(fbm2*4.0)/2.0;
150: vec4 col;
151: if (fbm2 < 0.625) {
> 152: col = texture(colorscheme, vec2(posterized, uv.y));
153: } else {
154: col = texture(dark_colorscheme, vec2(posterized-1.0, uv.y));
155: }
156:
157: gl_FragColor = vec4(col.rgb, a * col.a);
158: }
THREE.WebGLProgram: Shader Error 1282 - VALIDATE_STATUS false
Program Info Log:
FRAGMENT
ERROR: 0:123: 'texture' : no matching overloaded function found
ERROR: 0:123: 'assign' : cannot convert from 'const float' to 'highp 4-component vector of float'
ERROR: 0:125: 'texture' : no matching overloaded function found
ERROR: 0:125: 'assign' : cannot convert from 'const float' to 'highp 4-component vector of float'
118:
119: // apply some colors based on final value
120: float posterized = floor((ring+pow(light_d, 2.0)*2.0)*4.0)/4.0;
121: vec4 col;
122: if (posterized <= 1.0) {
> 123: col = texture(colorscheme, vec2(posterized, uv.y));
124: } else {
125: col = texture(dark_colorscheme, vec2(posterized-1.0, uv.y));
126: }
127: float ring_a = step(0.28, ring);
128:
129: gl_FragColor = vec4(col.rgb, ring_a * col.a);```
@KurtLa There is most probably a uniform type mismatch in the texture function, can you give me some more of what you tried in the ts branch? like what have you used in the ts branch if the files are .js.I'll try to get back as fast as possible in next week :)
@Timur310 yes sure.
I can reproduce it on all my computer.
npm install jsdom
in server-side-example.js add:
import { createGasGiantRing } from "./src/Planets/gasGiantRing.js";
import jsdom from "jsdom";
const { JSDOM } = jsdom;
global.document = new JSDOM(`<p></p>`, {
includeNodeLocations: true,
}).window.document;
planetGroup.add(createGasGiantRing());
execute it with: node server-side-example.js
#edit: node v14.21.2
#edit2 same goes for the ts branch, but execute npm install typescript npx ts-node server-side-example.js
Hi @Timur310 were you able to reproduce my error?
Hey @KurtLa sorry for the delayed response, I've been busy latelly with other works, but I'll try to reproduce it as soon as possible.Sorry for that again!