Skip to content

Commit 4e5b353

Browse files
committed
after almost a year I declare the tutorial finished
1 parent 3dec5a7 commit 4e5b353

File tree

7 files changed

+10
-35
lines changed

7 files changed

+10
-35
lines changed

src/content/docs/current/Guides/Your First Shader/0_intro.mdx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,8 @@ description: Get started creating your first shader
44
sidebar:
55
label: An Introduction to Shaders
66
order: 1
7-
badge:
8-
text: In Development
9-
variant: caution
107
---
118

12-
:::caution[Warning]
13-
This tutorial is still being developed. Some statements may be incorrect, and things may change in the future. Got any feedback? [Comment on the tracking issue](https://github.com/IrisShaders/DocsPage/issues/327).
14-
:::
15-
169

1710
## Foreward
1811
This tutorial is based on one written by [saadam1n](https://github.com/saadam1n/MinecraftShaderProgramming). This newer tutorial has been necessitated by the fact that since the tutorial was written, the general state of development on Minecraft shaders has advanced somewhat, and other developers have identified several areas where this can be improved.

src/content/docs/current/Guides/Your First Shader/1_composite.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ sidebar:
66
order: 2
77
---
88

9-
:::caution[Warning]
10-
This tutorial is still being developed. Some statements may be incorrect, and things may change in the future. Got any feedback? [Comment on the tracking issue](https://github.com/IrisShaders/DocsPage/issues/327).
11-
:::
12-
139
## Setting Up the File Structure
1410
Minecraft shaders require a specific structure of files in the right places to load code. While it's important to understand this structure, to save time, we will be working with the Base 330 pack from shaderLABS. Download it from [here](https://github.com/shaderLABS/Base-330), and extract it into your `shaderpacks` folder. You should have the following structure.
1511

src/content/docs/current/Guides/Your First Shader/2_gbuffers.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ sidebar:
66
order: 2
77
---
88

9-
:::caution[Warning]
10-
This tutorial is still being developed. Some statements may be incorrect, and things may change in the future. Got any feedback? [Comment on the tracking issue](https://github.com/IrisShaders/DocsPage/issues/327).
11-
:::
12-
139
In this next section, we will start with a fresh copy of the Base-330 pack, instead of using the grayscale version we made in the previous step. You could also just remove the lines you added to `composite.fsh`.
1410

1511
For the purposes of this tutorial, we will only be covering the shading of terrain. Therefore, it is worth deleting all other files starting with `gbuffers_`. You can also get rid of the `deferred` files. You should now just have

src/content/docs/current/Guides/Your First Shader/3_composite_lighting.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ sidebar:
66
order: 3
77
---
88

9-
:::caution[Warning]
10-
This tutorial is still being developed. Some statements may be incorrect, and things may change in the future. Got any feedback? [Comment on the tracking issue](https://github.com/IrisShaders/DocsPage/issues/327).
11-
:::
12-
139
In this section we will implement basic diffuse shading in the composite pass. As such, we will be primarily editing `composite.fsh`.
1410

1511
## Gamma Correction

src/content/docs/current/Guides/Your First Shader/4_shadows.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ sidebar:
66
order: 4
77
---
88

9-
:::caution[Warning]
10-
This tutorial is still being developed. Some statements may be incorrect, and things may change in the future. Got any feedback? [Comment on the tracking issue](https://github.com/IrisShaders/DocsPage/issues/327).
11-
:::
12-
139
In this section we will implement basic shadow mapping which allows us to check if a pixel has a shadow cast on it.
1410

1511
## The `shadow` Pass

src/content/docs/current/Guides/Your First Shader/5_fog.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ sidebar:
66
order: 5
77
---
88

9-
:::caution[Warning]
10-
This tutorial is still being developed. Some statements may be incorrect, and things may change in the future. Got any feedback? [Comment on the tracking issue](https://github.com/IrisShaders/DocsPage/issues/327).
11-
:::
12-
139
In this section we will implement depth based fog, so that things seem to fade into the distance.
1410

1511
## Another `composite` Pass

src/content/docs/current/Guides/Your First Shader/6_next_steps.mdx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,32 @@ sidebar:
66
order: 5
77
---
88

9-
:::caution[Warning]
10-
This tutorial is still being developed. Some statements may be incorrect, and things may change in the future. Got any feedback? [Comment on the tracking issue](https://github.com/IrisShaders/DocsPage/issues/327).
11-
:::
12-
139
This is as far as we go with the tutorial, but there's plenty more that can be done with the shader!
1410

1511
## Issues to Fix
16-
### Transparent Entities
12+
### "Transparent" Entities
1713
![](../../../../../assets/beginner_tutorial/transparententities.webp)
18-
Right now, our entities seem semitranslucent. This is because we have only written a `gbuffers_terrain` program. Entities are handled by `gbuffers_entities`, which falls back to `gbuffers_textured_lit`. Since we have not overriden this program, it doesn't write our normals or lightmap data to the buffers we need it to. An easy way to resolve this is to rename `gbuffers_terrain` to `gbuffers_textured_lit`, which most programs we care about will fall back to. For more information, see [Gbuffers](http://localhost:4321/current/reference/programs/gbuffers/).
14+
Right now, our entities appear partially translucent. This is because we have only written a `gbuffers_terrain` program. Entities are handled by `gbuffers_entities`, which falls back to `gbuffers_textured_lit`. Since we have not overriden this program, it doesn't write our normals or lightmap data to the buffers we need it to. An easy way to resolve this is to rename `gbuffers_terrain` to `gbuffers_textured_lit`, which most programs we care about will fall back to. For more information, see [Gbuffers](/current/reference/programs/gbuffers/).
1915

2016
### Bright Night
2117
Since our sunlight and skylight colors are constant, things are still very well lit at night. This can be improved by varying the skylight and sunlight colors based on the time of day. We can do this using the uniform [`worldTime`](/current/reference/uniforms/world#worldtime).
2218

2319
## Things to Do
2420
Here are some things you could try adding to your shader next. Some of these are more complex than others, and may require additional research into graphics programming.
21+
22+
:::caution[Warning]
23+
**None of the resources linked to are Minecraft specific!** You will need to modify the code they provide quite significantly to make it work in your shaderpack. **Do not expect to be able to just copy and paste code and have it work**.
24+
:::
25+
2526
- A custom sky, using a simple gradient based on the time of day, or even a physically based atmosphere
2627
- Waving water and foliage
2728
- Better shadow filtering, using [interleaved gradient noise](https://blog.demofox.org/2022/01/01/interleaved-gradient-noise-a-different-kind-of-low-discrepancy-sequence/) and a [Vogel disk](https://www.shadertoy.com/view/tddXWl)
2829
- A [tonemap](https://64.github.io/tonemapping/)
2930
- Clouds
3031
- Specular shading, using something like [Blinn-Phong shading](https://learnopengl.com/Advanced-Lighting/Advanced-Lighting) or at a more advanced level, the [Cook-Torrance BRDF](https://learnopengl.com/PBR/Theory)
31-
- Screen Space Reflections
32-
- Bloom
32+
- [Screen Space Ambient Occlusion (SSAO)](https://learnopengl.com/Advanced-Lighting/SSAO)
33+
- [Screen Space Reflections](https://lettier.github.io/3d-game-shaders-for-beginners/screen-space-reflection.html)
34+
- [Bloom](https://learnopengl.com/Advanced-Lighting/Bloom). Most modern packs do [bloom in HDR](https://learnopengl.com/Guest-Articles/2022/Phys.-Based-Bloom), which will require you to use a [floating point buffer format](current/reference/constants/buffer_format/) and store every "mip level" in a single texture.
3335

3436
## Resources
3537
- The [shaderLABS discord](https://discord.gg/RpzWN9S) has some resources on shader development, but also has channels where you can ask for help if you're stuck on something.

0 commit comments

Comments
 (0)