Revert "adding camera to 3d render. angles not yet working."
This reverts commit 602d0bb342.
This commit is contained in:
parent
8dd2f2b292
commit
1fff1fbce2
12 changed files with 29 additions and 197 deletions
|
|
@ -8,16 +8,13 @@ varying vec3 normal;
|
|||
varying vec3 lightDirection;
|
||||
|
||||
uniform mat4 model;
|
||||
uniform mat4 view;
|
||||
uniform vec3 lightPosition;
|
||||
uniform float aspectRatio;
|
||||
|
||||
void main()
|
||||
{
|
||||
// TODO: this becomes invalid when projection matrices are used
|
||||
vec3 asp = vec3(aspectRatio, 1.0, 1.0);
|
||||
//vec3 asp = vec3(1.0, 1.0, 1.0);
|
||||
vec3 p = (view*model*vec4(in_vertex, 1.0)).xyz;
|
||||
vec3 p = (model*vec4(in_vertex/vec3(aspectRatio, 1.0, 1.0), 1.0)).xyz;
|
||||
lightDirection = normalize(lightPosition - p);
|
||||
|
||||
vertex = p.xyz;
|
||||
|
|
|
|||
|
|
@ -28,8 +28,6 @@ void main()
|
|||
//decay = max(decay*decay, sqrt(decay));
|
||||
decay = ageMod / halfAge;
|
||||
|
||||
//vec3 av = vec3(aspectRatio, 1.0, 1.0);
|
||||
|
||||
// faster particles are smaller
|
||||
// TODO: scale by time too! scale down fast after 3 halfAges
|
||||
float scaleBySpeed = (1.0 - 0.95*length(in_velocity)/maxVelocity);
|
||||
|
|
@ -41,7 +39,6 @@ void main()
|
|||
if (md > in_maxDist) {
|
||||
move *= in_maxDist / md;
|
||||
}
|
||||
|
||||
vec3 offset = move + in_position;
|
||||
p += offset;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue