You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/current/Guides/Your First Shaderpack/0_intro.mdx
+13-2Lines changed: 13 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,14 +16,24 @@ This tutorial is based on one written by [saadam1n](https://github.com/saadam1n/
16
16
:::
17
17
18
18
You will need:
19
-
- A suitable text editor for modifying shader code. One popular choice is [Visual Studio Code](https://code.visualstudio.com/), but any program which can edit text files is sufficient. A simpler but popular editor is [Notepad++](https://notepad-plus-plus.org/).
19
+
- A suitable text editor for modifying shader code (see below).
20
20
- A computer capable of running OpenGL 3.3. If your computer was manufactured in the last 15 years it likely supports OpenGL 3.3. Note that whilst OpenGL works on macOS, Apple will not update the drivers to support any version past OpenGL 4.1 and some things may not work correctly.
21
21
- A willingness to learn. Shaders are hard, and you can't just pick them up overnight. Do not expect to complete this tutorial and become the next Sonic Ether.
22
22
- An instance of Minecraft with Iris, Optifine, or Oculus installed. Since this tutorial is in the Iris documentation, it is assumed you are using Iris.
23
23
24
+
## Development Environment
25
+
26
+
Any text editor is suitable for shader development. One popular choice is [Visual Studio Code](https://code.visualstudio.com/), but any program which can edit text files is sufficient. A simpler but popular editor is [Notepad++](https://notepad-plus-plus.org/).
27
+
28
+
If you are using Visual Studio Code (which we recommend), there are a couple of extensions you can use which can help with development.
29
+
30
+
-[GLSL Syntax for VS Code](https://marketplace.visualstudio.com/items?itemName=GeForceLegend.vscode-glsl)
31
+
-[Language Server for Minecraft Shaderpacks](https://marketplace.visualstudio.com/items?itemName=GeForceLegend.vscode-mcshader)
32
+
24
33
It's helpful to be able to see your game logs as the game is running. In the vanilla Minecraft launcher, you can do this by enabling 'keep the Launcher open while games are running' and 'Open output log when Minecraft: Java Edition starts" in the settings.
25
34
If you do not use the vanilla launcher, but your launcher does not support viewing logs in realtime, a popular choice is [Prism Launcher](https://prismlauncher.org/).
26
-
In Iris, it is also useful to enable debug mode. You can do this by pressing <kbd>Ctrl</kbd>+<kbd>D</kbd> in the shader selection screen.
35
+
36
+
It is also useful to enable debug mode. You can do this by pressing <kbd>Ctrl</kbd>+<kbd>D</kbd> in the shader selection screen. For more info, see [debugging shaders](/current/reference/miscellaneous/debugging_shaders/).
27
37
28
38
29
39
## OpenGL and GLSL
@@ -43,3 +53,4 @@ Odds are, all your previous code has been executed on the CPU. Shaders are inste
43
53
:::
44
54
45
55
For a full list of programs and what they do, see the [Iris Docs](/current/reference/programs/overview/).
Copy file name to clipboardExpand all lines: src/content/docs/current/Reference/Miscellaneous/debugging_shaders.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,10 +16,10 @@ The 'Use no error context' setting will prevent the game from loading on some AM
16
16
# Finding Compilation Errors
17
17
Iris does not have proper support for line numbers in error messages. Line numbers in error messages correspond to the patched version of your shader code, which will not necessarily line up with the line numbers in your original code, especially if you have made use of the `#include` directive. The patched shader output can be found in the `.minecraft/patched_shaders`. Here's an example.
Opening `.minecraft/patched_shaders/005_deferred2.fsh` and navigating to line 336, we can see the line causing the error. Using the surrounding context, and perhaps the find+replace option in your text editor/IDE, you should be able to find the offending line.
Copy file name to clipboardExpand all lines: src/content/docs/current/Reference/Miscellaneous/patcher.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,16 +8,16 @@ sidebar:
8
8
9
9
The source code of a shader pack is not the final code that is compiled and executed. In order to ensure maximum compatibility, Iris runs the shader code through [glsl-transformer](https://github.com/IrisShaders/glsl-transformer), which generates **patched shader code**. This is the code that actually ends up on the GPU. In the context of developing shaders, there are several important consequences to note:
10
10
11
-
- Since the patcher removes non-necessary whitespace in the code, line numbers in errors will not match up with the line numbers in your code
11
+
- Since the patcher removes non-necessary whitespace in the code, line numbers in errors will not match up with the line numbers in your code.
12
12
- You cannot name your functions or variables in a similar manner as internal Iris variables:
13
13
-`iris_`
14
14
-`irisMain`
15
15
-`moj_import`
16
-
- The patcher will sometimes fix code that should otherwise fail
17
-
- Conversely, the patcher may not be flawless. If you're experiencing a bug and have exhausted all other possibilites, its worth checking the patched shader code
16
+
- The patcher will sometimes fix code that should otherwise fail.
17
+
- Conversely, the patcher may not be flawless. If you're experiencing a bug and have exhausted all other possibilites, it's worth checking the patched shader code.
18
18
19
19
:::tip
20
-
When [debug mode](/current/reference/miscellaneous/patcher/) is enabled, the patched shader code can be found in the `/patched_shaders/` folder in the root of your Minecraft directory.
20
+
When [debug mode](/current/reference/miscellaneous/debugging_shaders/) is enabled, the patched shader code can be found in the `/patched_shaders/` folder in the root of your Minecraft directory.
21
21
:::
22
22
23
23
More information can be found [here](https://github.com/IrisShaders/Iris/blob/1.21/docs/usage/debugging.md).
0 commit comments