Questions tagged [matrix-engine]
6 questions
2
votes
1 answer
WebGL: INVALID_VALUE: texImage2D: invalid internalformat - depthTexture in webgl2
const depthTextures = gl => {
const depthTexture = gl.createTexture();
const depthTextureSize = 512;
gl.bindTexture(gl.TEXTURE_2D, depthTexture);
gl.texImage2D(gl.TEXTURE_2D, // target
0, // mip level
gl.DEPTH_COMPONENT, // internal…

Nikola Lukic
- 4,001
- 6
- 44
- 75
1
vote
0 answers
Logic for jumping in webgl with physics enabled
Most important code just for example. Func UPDATE is called in every draw frame.
I want implement jumping virtualJumpActive == true logic.
I invert procedure for virtualJumpActive == true to make scene object and camera position set by cannonjs…

Nikola Lukic
- 4,001
- 6
- 44
- 75
1
vote
2 answers
Construct chess board like texture with Uint8Array
Code:
var options = {
squareShema: [8,8],
pixels: new Uint8Array(8 * 8 * 4)
};
options.pixels.fill(122);
var I = 0, localCounter = 0;
// options.pixels.fill(I ,funny, funny+1);
for (var funny = 0; funny < 8*8*4; funny+=4) {
if…

Nikola Lukic
- 4,001
- 6
- 44
- 75
1
vote
0 answers
Implemeting raycast intro custom webgl - glmatrix based engine solution
If anyone wanna help or any type of suggestion (links) i would be satisfied. I create little engine with scene object based render.
Success with triangle but only when camera is front of triangle .
After App.camera.FirstPersonController = true you…

Nikola Lukic
- 4,001
- 6
- 44
- 75
0
votes
0 answers
Custom webgl engine with Cannon.js , How to resolve jumping, blocking and walk
I look at stackoverflow other people similar problems a they have very similar solution but all examples are done in three.js (Not in my case).
Jump is relative good working at the moment, i powered gravity (double it).
Stairs also works fine even…

Nikola Lukic
- 4,001
- 6
- 44
- 75
0
votes
0 answers
Implementation of BHV intro basic custom webgl program
I found basic information :
https://research.cs.wisc.edu/graphics/Courses/cs-838-1999/Jeff/BVH.html
https://en.wikipedia.org/wiki/Biovision_Hierarchy
But i need for help to make it possible. I have scene object with position, rotation, vertex data…

Nikola Lukic
- 4,001
- 6
- 44
- 75