Skip to content

Orthographic projection can break agent colours. #155

Description

@Robadob

Below the user would expect the agent to appear green, but green only seems to appear on that small point close to centre of the screen. (icosphere model used)

Image

Inside fragment shader the dot() returns a value very close to zero, and the diffuse component gets wiped out (presumably in practice this because a bright specular should take over). This occurs on the crisistrack rail model, when trains are represented by most/any model only around 5px big, leading them to appear black regardless of colour.

    // Process Diffuse
    {// Diffuse component: 0.85f
      float lambertian = max(dot(surfaceToLight,eyeNormal),0.0f);//phong
      diffuse *= vec4(vec3(lambertian * 0.85f), 1.0f);
    }

Need to pass a flag to replace orthographic frag shader with something different, e.g. no shade plain colour.

Other weird behaviour can be observed in the game of life simulation, where brightness changes with how close you are to the plane, and/or the edges appear more dull.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions