Code Monkey home page Code Monkey logo

Comments (2)

michaliskambi avatar michaliskambi commented on June 7, 2024 1

Thank you for catching this! It was always occurring when you have "Anti-Aliasing" selected in view3dscene options. We did a trivial mistake in shader code change recently.

Fixed.

Allow a few hours for the Jenkins to rebuild Castle Game Engine and then view3dscene, and the problem will disappear in latest "snapshot" version from the top of https://castle-engine.io/view3dscene.php .

Note about your attached example: on my current GPU (Mesa DRI Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2) on Linux) it required an extra fix, reporting compilation error initially:

VRML/X3D: Cannot use GLSL shader for shape "Box": Fragment shader not compiled:
0:31(17): error: no matching function for call to `mix(int, int, float)'; candidates are:
0:31(17): error:    float mix(float, float, float)
0:31(17): error:    vec2 mix(vec2, vec2, float)
0:31(17): error:    vec3 mix(vec3, vec3, float)
0:31(17): error:    vec4 mix(vec4, vec4, float)
0:31(17): error:    vec2 mix(vec2, vec2, vec2)
0:31(17): error:    vec3 mix(vec3, vec3, vec3)
0:31(17): error:    vec4 mix(vec4, vec4, vec4)
0:31(11): error: cannot construct `vec3' from a non-numeric data type
0:31(2): error: no matching function for call to `star(vec3, error, vec2, float)'; candidates are:
0:31(2): error:    void star(vec3, vec3, vec2, float)
0:32(8): warning: `c' used uninitialized

To fix, change the line

star( c, vec3( mix( -20,2, rand( i ))), f, 0.3 ); /* stars */

to

star( c, vec3( mix( -20.0,2.0, rand( i ))), f, 0.3 ); /* stars */

That is, add .0 to two constant values, to make them float. In GLSL, automatic promotion from integer->float is not allowed, unlike in most other languages.

from view3dscene.

elmkni avatar elmkni commented on June 7, 2024

Hi Michalis,

it's me, Elmar.

Thank you very much for the quick fix and also for the info about my mistake ;)

I had actually fixed the int-to-float issue in most of my files, but accidentally send one of the un-fixed... (Murphy's Law)

Best regards,
Elmar

from view3dscene.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.