Shader inputs are the controls that allow you to pass data to your shaders. You can import image files to use as textures and 3D model files to use for your geometry (currently ShaderScope only supports the .obj file format for 3D models).
To import a file you can
To move the camera to view your 3D model from different angles
The Shader Input will be labeled with its file name, but if you would prefer to label it differently you can double-click its label and change it (doing this will not affect how ShaderScope finds or reads the underlying file; it's just a helpful label for your project).
3D model files will be shown as an untextured model with a grid that helps you see how its UVs are arranged (models with no UV data will show up as a single color). The camera for this view is independent and won't affect the cameras of any pipeline states or render passes that depend on this 3D model; it's just here to help you see what you're working with.
To connect this control's shader input to your shader parameters:
When the connection is complete you will see your new connection on the Shader Path and the value will be immediately passed to that parameter every frame (no need to recompile the shader).
If you pass a 3D model to a shader that expects a texture to color it but haven't yet added the texture, it will render as black until you connect a texture or add code to your fragment shader to color it manually.
The textures that serve as color attachments for render passes or write destinations for compute shaders can be used as inputs to another shader's texture parameter. Simply connect them as you would any other texture and you'll see their image applied to the destination shader in real time, with no recompilation necessary.
Because color attachment (render target) and compute shader output (write destination) textures don't come from a source file, you can adjust their resolution to suit your needs. In particular, if you have an upstream render pass whose resolution you've adjusted and its color attachment is an input texture for a downstream compute shader, you'll want to make sure their resolutions match. To adjust an output texture's resolution:
| Render Pass Color/Depth Attachment | Edit the resolution of the render pass itself, which will update the resolutions of all of its attachment textures. Right-click the render pass and select its Properties... context menu or select Render Pass -> Properties from the Shader Path toolbar menu. |
| Compute Shader Output Texture | Right-click the output texture and select its Properties... context menu or select Shader Input -> Properties from the Shader Path toolbar menu. |