Welcome, Guest.
Username: Password: Remember me

TOPIC: Where to start programming new shaders?

Where to start programming new shaders? 2 years 2 weeks ago #1

I'm an amateur programmer and I want to create some new shaders for Skyrim Special Edition and see how shaders work. But I have no idea where to start, where to add my code, ... . What I want to do is to program and add my own shader to play a certain effect on a simple plane in the game. Where should I start?
The administrator has disabled public write access.

Where to start programming new shaders? 2 years 2 weeks ago #2

You can't do that with ReShade. With ReShade you can write post-processing shaders that work on the entire image at once. Information about specific objects in the scene are not available.
Cheers, crosire =)
The administrator has disabled public write access.
The following user(s) said Thank You: januarybef

Where to start programming new shaders? 2 years 2 weeks ago #3

I know about that. But I thought maybe if I could set the plane's texture to a very unusual color, like a high intensity blue, I could tell Reshade to take all of the pixels, forget the ones which are not this specific blue and do a specific action over the blue pixels. Couldn't I?
The question is not about how I can write this specific shader. It was just an example. I want to know how am i even supposed to write a shader using Reshade. Where should I save my shader. How to make Reshade inject my shader. How and which of the files should I include at the top of the program. The documentation seems quite vague (or maybe it's because I'm too amateur to understand it) Does it even have a debugging tool?
Last Edit: 2 years 2 weeks ago by januarybef.
The administrator has disabled public write access.

Where to start programming new shaders? 2 years 2 weeks ago #4

Create an *.fx file and place it in one of the folders that were set under "Effect Search Paths" in ReShade's UI. ReShade will then pick it up, try to compile it and apply all techniques that you enable in the UI to the game.
The format of ReShade FX files (*.fx) is documented here: github.com/crosire/reshade-shaders/blob/master/REFERENCE.md. Since the syntax is similar to the popular HLSL language, you apply most of the things learned from tutorials for HLSL to ReShade FX as well. Here's a good starting point: msdn.microsoft.com/en-us/library/windows...944006(v=vs.85).aspx.
Cheers, crosire =)
The administrator has disabled public write access.
The following user(s) said Thank You: januarybef

Where to start programming new shaders? 2 years 2 weeks ago #5

THANKS! You're a lifesaver. At least now I have a direction to start. ;)
The administrator has disabled public write access.