Add sun glitter
This commit is contained in:
@@ -374,16 +374,13 @@ function drawScene() {
|
||||
mat4.identity(projection);
|
||||
mat4.perspective(projection, 1.0, viewportWidth / viewportHeight, 0.1, 1000.); //projection mode should actually be camera specific
|
||||
|
||||
camera.setOffset(15.0);
|
||||
camera.setOffset(1.2);
|
||||
camera.setRotationX((curRotX += mouseYVel * 0.001));
|
||||
camera.setRotationY((curRotY += mouseXVel * 0.001));
|
||||
var view = camera.getViewMatrix();
|
||||
|
||||
var model = mat4.create();
|
||||
mat4.identity(model);
|
||||
let xyScaling = vec3.create();
|
||||
vec3.set(xyScaling, 10., 10., 1.0);
|
||||
mat4.scale(model, model, xyScaling); //2. Then scale the surface xy by factor 10
|
||||
let translationCentering = vec3.create();
|
||||
vec3.set(translationCentering, -0.5, -0.5, 0.0);
|
||||
mat4.translate(model, model, translationCentering); //1. First Center the Surface in the origin.
|
||||
|
||||
Reference in New Issue
Block a user