All Projects → miloyip → Light2d

miloyip / Light2d

Light rendering in 2D

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Light2d

structured-volume-sampling
A clean room implementation of Structured Volume Sampling by Bowles and Zimmermann in Unity
Stars: ✭ 27 (-95.99%)
Mutual labels:  graphics-programming
Softwarerenderer
Software rendering engine with PBR. Built from scratch on C++.
Stars: ✭ 323 (-52.01%)
Mutual labels:  graphics-programming
Lume
Create CSS3D/WebGL applications declaratively with HTML. Give regular DOM elements shadow and lighting.
Stars: ✭ 445 (-33.88%)
Mutual labels:  graphics-programming
xfg-rs
eXtensible Framegraph
Stars: ✭ 34 (-94.95%)
Mutual labels:  graphics-programming
Learningdirectx12
This repository is intended to be used as a code repository for learning DirectX 12.
Stars: ✭ 256 (-61.96%)
Mutual labels:  graphics-programming
Rendu
A simple realtime graphics playground for experimentations.
Stars: ✭ 343 (-49.03%)
Mutual labels:  graphics-programming
Yggdrasil-Legacy
Experimental Vulkan Renderer / Game Engine written in C++20.
Stars: ✭ 20 (-97.03%)
Mutual labels:  graphics-programming
Dungeontemplatelibrary
🌏: Dungeon free resources (terrain & roguelike generation)
Stars: ✭ 595 (-11.59%)
Mutual labels:  graphics-programming
Rabbittoolbox
🤸🏾‍♀️👗开源的动画渲染软件,提倡以简单、易用,高质量的物理演算以及渲染质量和性能,为喜爱二次元动画的用户降低视频制作门槛
Stars: ✭ 309 (-54.09%)
Mutual labels:  graphics-programming
Cpp 3d Game Tutorial Series
C++ 3D Game Tutorial Series is a YouTube tutorial series, whose purpose is to help all those who want to take their first steps in the game development from scratch.
Stars: ✭ 400 (-40.56%)
Mutual labels:  graphics-programming
makma
Makma is a deferred Vulkan renderer written in C++.
Stars: ✭ 77 (-88.56%)
Mutual labels:  graphics-programming
BunnyLOD
Cross platform GLFW based port of Stan Melax's BunnyLOD Easy Mesh Simplification
Stars: ✭ 60 (-91.08%)
Mutual labels:  graphics-programming
Openvg
Tools for exploring OpenVG
Stars: ✭ 371 (-44.87%)
Mutual labels:  graphics-programming
dw-sample-framework
A simple C++ framework for implementing graphics technique samples using OpenGL and Vulkan.
Stars: ✭ 76 (-88.71%)
Mutual labels:  graphics-programming
Awesome Glsl
🎇 Compilation of the best resources to learn programming OpenGL Shaders
Stars: ✭ 530 (-21.25%)
Mutual labels:  graphics-programming
PlanetRenderer
A repo for my research on planet rendering in c++ | opengl **Now runs on Linux**
Stars: ✭ 62 (-90.79%)
Mutual labels:  graphics-programming
Gpu Pro Books Source Code
💿 Source Code Collection of Book <GPU Pro> 1~ 7 | 《GPU Pro》1~ 7 书本源代码珍藏
Stars: ✭ 323 (-52.01%)
Mutual labels:  graphics-programming
Renderdoc
RenderDoc is a stand-alone graphics debugging tool.
Stars: ✭ 5,969 (+786.92%)
Mutual labels:  graphics-programming
Hybridrenderingengine
Clustered Forward/Deferred renderer with Physically Based Shading, Image Based Lighting and a whole lot of OpenGL.
Stars: ✭ 563 (-16.34%)
Mutual labels:  graphics-programming
Rpd
👌 A Minimal Engine for creating Node-Based Visual Programming User Interfaces
Stars: ✭ 370 (-45.02%)
Mutual labels:  graphics-programming

light2d

This project illustrates light rendering in 2D with C.

All samples output PNGs with svpng.

License: public domain.

Basic

Use Monte Carol integration and ray marching of signed distance field (SDF) to render a emissive circle.

Source code: basic.c

Uniform sampling (64 samples per pixel):

Uniform sampling with different number of samples per pixel:

Stratified sampling (64 samples per pixel):

Jittered sampling (64 samples per pixel):

Various sampling method side-by-side comparison (64 samples per pixel)::

Constructive Solid Geometry

Source code: csg.c

Use union operation for creating multiple shapes:

Various CSG operations on two circles:

Shapes

Source code: shapes.c

Examples of various shapes defined by SDF:

Reflection

Source code: reflection.c

Test scene with two boxes:

Visualization of SDF gradient, which is approximated by central difference:

Reflection via recursive tracing:

Concave mirror scene generates caustics effect:

Refraction

Source code: refraction.c

Applying Snell's law to compute refraction direction. Total internal reflection is also handled.

Test scenes:

Fresnel Reflectance

Source code: fresnel.c

Applying Fresnel equation to compute reflectance of dielectric medium.

Without Fresnel:

With Fresnel term:

Beer-Lambert

Source code: beerlambert.c beerlambert_color.c

Applying Beer-Lambert law to simulate absorption of light in medimum.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].