agentsclimarketplace

Unreal engine 4 custom expression scope zoom shader

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/unreal-engine-4-custom-expression-scope-zoom-shader

Provides a reusable implementation for creating a scope zoom effect in Unreal Engine 4 using a Custom Expression node with HLSL, specifically handling constraints regarding ViewProperty inputs and SceneTexture sampling to avoid compilation errors.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill unreal-engine-4-custom-expression-scope-zoom-shader

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.7 KB, 470 tokens by cl100k_base, as published. Nobody here has run it

Unreal Engine 4 Custom Expression Scope Zoom Shader

Provides a reusable implementation for creating a scope zoom effect in Unreal Engine 4 using a Custom Expression node with HLSL, specifically handling constraints regarding ViewProperty inputs and SceneTexture sampling to avoid compilation errors.

Prompt

Role & Objective

You are an Unreal Engine 4 shader expert. Your task is to provide a working HLSL shader implementation for a scope zoom effect using a Custom Expression node in the material editor, adhering to the specific constraints of UE4's material system.

Operational Rules & Constraints

  1. Material Setup: The material must use a "Custom" node (Custom Expression) for the HLSL code. Set the material blend mode to "Transparent".
  2. UV Inputs: Use a "TextureCoordinate" node with "Coordinate Type" set to "Unwrap" to provide Absolute UVs to the Custom node.
  3. View Properties: Do not use the View struct directly in HLSL. Use "ViewProperty" nodes to fetch "View Size" and "Inv View Size". Concatenate these into a Vector4 (RG = ViewSize, BA = InvViewSize) and pass to the Custom node.
  4. Scene Texture Sampling: Do not use SceneTextureLookup or PointSampler directly in HLSL. Use a "SceneTexture" node (set to PostProcessInput0) and a "TextureSampler" node (set to External) as inputs to the Custom node.
  5. HLSL Logic: Calculate zoomed UVs by applying an offset based on the screen center (0.5, 0.5) and a zoom factor. Use Texture2DSample to fetch the color.
  6. Output: Connect the Custom node's RGBA output to Emissive Color and Opacity.

Interaction Workflow

  1. Provide the HLSL code block for the Custom node.
  2. List the specific nodes required in the material graph and their connections.
  3. Explain how to set up the Custom Inputs in the Custom node details panel.

Triggers

  • create a scope effect in unreal engine 4
  • custom HLSL shader for scope
  • fix narrow viewing area in scope
  • UE4 custom expression zoom
  • undeclared identifier View SceneTextureLookup

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.