es.davy.ai

Preguntas y respuestas de programación confiables

¿Tienes una pregunta?

Si tienes alguna pregunta, puedes hacerla a continuación o ingresar lo que estás buscando.

Tag: UNITY-WEBGL

¿Por qué no puedo representar en una textura de punto flotante en WebGL?

Estoy creando un framebuffer y adjuntándole una textura. Aquí está la textura que me gustaría adjuntar (pero no funciona): gl.texImage2D(gl.TEXTURE_2D, 0, gl.R32F, sphere_texture.width, sphere_texture.height, 0, gl.RED, gl.FLOAT, null); Sin embargo, cuando uso este formato de textura, funciona: gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, sphere_texture.width, sphere_texture.height, 0, gl.RGB, gl.UNSIGNED_BYTE, null); ¿Alguien sabe cómo podría . . . Read more

¿Cómo puedo obtener un campo de WebGlContextAttributes?

Mi caso es así, solo quiero obtener el campo de la estructura WebGlContextAttributes. let antialias_info = gl.get_context_attributes().unwrap(); match antialias_info.antialias { // … } Recibo el siguiente error: attempted to take value of method `antialias` on type `web_sys::WebGlContextAttributes` method, not a field. Y he leído la documentación en WebGlContextAttributes, pero aún . . . Read more