Giter VIP home page Giter VIP logo

phong-software-renderer's People

Contributors

marsp0 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

wyb314

phong-software-renderer's Issues

OBJ parser

Add a basic OBJ paraser that would be able to parse meshes/textures/light sources

Camera

Add a Camera that will be part of the Scene. The camera should implement both perspective and orthographic projections, it should also implement the view matrix.

Parallelizing the triangle rasterization code

  1. Use OpenMP to parallelize the for loop that iterates over the faces of a mesh. This step should generate an output list of faces that will be rendered
  2. Use a thread pool to iterate over the generated faces and rasterize the different sections

Indexing of vertex attributes

Instead of repeating the same vertex multiple times, we should store vertices once in a vector and use indices to retrieve the correct vertex data when necessary.

Model Orientation

Add the below to the Model class and allow the user to switch between them.

  • Euler Angles
  • Quaternions
  • Axis-Angle
  • 3D matrix

Attribute interpolation

Add attribute interpolation (for now just color i guess). Add both linear and perspective-correct interpolation.

Makefile targets

  1. create new targets for the different shaders and reflection models
    • make shader-reflection
  2. Move the test into a separate executable

Debug System

Render overlay with

  • bounding boxes of models
  • axis representing local coordinate systems
  • world coordinate system
  • camera coordinate system
    more

Documentation

Add documentation to the current code + generate docs.

Render a cube with the correct transforms

Now that world transform, camera transform and the projection matrix are in update the draw code to

  • get the different matrices
  • multiply the vertices by them
  • render the cube with different colors on faces.
  • no backface culling or anything like that. For now we can order the vertices in a way that would hide the back face

Draw a model

We want to be able to construct a model and draw it in the renderer main loop.

  • the vertex shader should just get the color associated with the current vertex and pass it forward
  • the fragment shader should simply use the passed color (no interpolation or fancy stuff)
  • dont need to apply any transforms to the vertex, simply get the vertices and their color from the model and draw it as is

Refactor the parser

The scene parser works but is extremely ugly, refactor to avoid having 100 line functions

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.