mirror of
https://github.com/patriciogonzalezvivo/thebookofshaders
synced 2024-11-17 21:25:40 +00:00
fixing mouse interaction
This commit is contained in:
parent
7565766024
commit
e5115ade1f
@ -455,7 +455,7 @@ function renderShader( _billboard ) {
|
|||||||
mouse.y <= rect.bottom){
|
mouse.y <= rect.bottom){
|
||||||
|
|
||||||
var mouseLocation = _billboard.gl.getUniformLocation(_billboard.program, "u_mouse");
|
var mouseLocation = _billboard.gl.getUniformLocation(_billboard.program, "u_mouse");
|
||||||
_billboard.gl.uniform2f(mouseLocation,mouse.x-rect.left,_billboard.canvas.height-mouse.y-rect.top);
|
_billboard.gl.uniform2f(mouseLocation,mouse.x-rect.left,_billboard.canvas.height-(mouse.y-rect.top));
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the resolution uniform
|
// set the resolution uniform
|
||||||
|
Loading…
Reference in New Issue
Block a user