Skip to content

Commit

Permalink
Added a small comment to post_processing example with instructions on…
Browse files Browse the repository at this point in the history
… how to make it work for 2d (#12775)

# Objective

- `examples/shader/post_processing.rs` is a shader example that works
for 3d
- I recently tried to update this example to get it to work on 2d but
failed to do so
- Then I created a discord help thread to help me figure this out.
[here's the link to the
thread](https://discordapp.com/channels/691052431525675048/1221819669116354723).

## Solution

- The solution is to replace all instances of 3d structures with their
respective 2d counterparts

## Changelog

- Added a small comment that explains how to get the example to work on
2d


#### Please do suggest changes if any

---------

Co-authored-by: IceSentry <[email protected]>
  • Loading branch information
agiletelescope and IceSentry authored Mar 30, 2024
1 parent eb44db4 commit 3e1c846
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/shader/post_processing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
//! and reads the texture generated by the main pass.
//!
//! The example shader is a very simple implementation of chromatic aberration.
//! To adapt this example for 2D, replace all instances of 3D structures (such as `Core3D`, etc.) with their corresponding 2D counterparts.
//!
//! This is a fairly low level example and assumes some familiarity with rendering concepts and wgpu.
Expand Down

0 comments on commit 3e1c846

Please sign in to comment.