8000 GitHub - Nazlbit/rasterizer
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Nazlbit/rasterizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

rasterizer

This program implements a simple model of a modern graphics pipeline. It takes geometry data as an input and produces an image. The image is then output to the console as an array of ASCII characters. The geometry data consists of an array of vertices and an array of indices that represent triangles. The vertices have different attributes such as their position, normals and shade. The program generates a spherical mesh as the input geometry. The vertices are transformed in the vertex_shader function, then the triangles are rasterized and the resulting fragments are shaded in the fragment_shader function.

The rendered image:

                                       ****##################                                       
                               ********##############################                               
                           **********####################################                           
                       =*************########################################                       
                    ==***************###########################################                    
                 ===******************############################################*                 
               =====********************###########################################**               
             +=====***********************##########################################***             
            ========***********************#########%%%%%%%##########################***            
          +=========***********************######%%@@@@@@@@%%%######################******          
         ++==========**********************####%%@@@@@@@@@@@@@%%##################*********         
        +++===========**********************###%%@@@@@@@@@@@@@@%%#############**************        
       ++++============**********************###%%@@@@@@@@@@@@%%######***********************       
      :++++==============*********************###%%%@@@@@@@@@%%#####*************************=      
      ++++++===============*********************#####%%%%%%%#####****************************=      
     :+++++++=================***********************########********************************==     
     ::+++++++===================***********************************************************===     
     ::++++++++======================******************************************************====     
     :::+++++++++========================***********************************************=======     
     ::::++++++++++===========================***************************************==========     
     -::::+++++++++++=================================**************************==============+     
      -::::+++++++++++++=====================================================================+      
      -::::::++++++++++++++=================================================================++      
       --::::::+++++++++++++++============================================================+++       
        --:::::::+++++++++++++++++=====================================================+++++        
         ---:::::::+++++++++++++++++++++===========================================++++++++         
          .---::::::::+++++++++++++++++++++++++===============================+++++++++++:          
            ----::::::::::+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++:            
             .----::::::::::::++++++++++++++++++++++++++++++++++++++++++++++++++++++:::             
               .-----::::::::::::::+++++++++++++++++++++++++++++++++++++++++++++:::::               
                 ..------::::::::::::::::++++++++++++++++++++++++++++++++++:::::::-                 
                    ..-------:::::::::::::::::::::::::+++++++++::::::::::::::::-                    
                       ...--------:::::::::::::::::::::::::::::::::::::::::--                       
                           ...------------:::::::::::::::::::::::::::----                           
                               .....--------------------------------.                               
                                       .........---------....                               

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0