S
S
sozercanie_kosmosa2016-10-06 19:32:03
JavaScript
sozercanie_kosmosa, 2016-10-06 19:32:03

How to properly render to texture?

Actually the essence of the question lies in its title.
Everything is done on javascript and pure webgl...
Browser - Chrome...
In this project, two quads are created
on the first one, a texture with b/w noise is stretched and
rendered into a texture that is stretched on the
second quad that is already rendered
into the screen buffer,
if you just render there is one
object in the screen buffer , then everything is fine with the position of the object, everything
is fine, but the problem occurs when rendering
occurs to the texture on the screen, everything is displayed,
but there is an offset as in the picture below ,
938a0ecf16f141d59272ab6995c070bf.png
although the position of the object is [0,0,0] and the camera looks
straight to its center (the exit is shown in red
out of bounds) the
question is how to correctly render to the texture so that the
position of the objects corresponds to the coordinates
link to the demo with the project
in the archive two files:
tst.html - to run
tst3.js - project code
I'm sorry, but
the code cannot be posted here due to the volume ,
if you need to lay out any part of the code, tell me.
ps: I didn’t find a tag here to hide under the spoiler =(

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question