Coder Social home page Coder Social logo

Comments (2)

Mugen87 avatar Mugen87 commented on June 14, 2024

Would you mind filing a PR with your fix? The addition looks correct. getInternalFormat() is the only place where something is missing for supporting RGIntegerFormat.

BTW: In your fiddle, you are not creating the instance of WebGLCubeRenderTarget correctly. The ctor has only two parameters, not three. Besides, position shader attributes are not of type vec4 but vec3.

In any event, adding your code makes the fiddle work without errors.

from three.js.

Aloalo avatar Aloalo commented on June 14, 2024

Ok, thanks, I'll create a PR.

Fixed the WebGLCubeRenderTarget construction in the fiddle for posterity: https://jsfiddle.net/h3e4zncb/1/
The position attribute is vec4, I'm using a RawShaderMaterial. Even if the underlying buffer data is vec3, WebGL will automatically set the 4th component to 1.0.

From https://registry.khronos.org/OpenGL/specs/es/3.0/es_spec_3.0.pdf:

Unspecified y and z components are implicitly set to 0.0 for floating-point array types and 0 for integer array types.
Unspecified w components are implicitly set to 1.0 for floating-point array types
and 1 for integer array types.

from three.js.

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.