x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How to use an HLSL shader as a shading model

Hello. I am quite new to coding in HLSL. So far, I've created a basic shader (.fx file) that outputs the ambient lighting. In the long run I am planning on writing a Cel shader in HLSL and using that as a custom shading model. I've seen some discussion on this, however I have not seen any clear answers except for the below post (however, even with this information I am lost).

The closest I've found is in this Answerhub post back in 2014, however I am a bit confused since I am fairly new the source code of the engine. Save my HLSL shader as .usf? Adding it as a reference in the UE4 source? I've looked through a few .usf files, however they look like C++ and not HLSL to me. I am also fairly new to C++ and HLSL, so the .usf files could be in HLSL and my amateur programming skills just depicts them as C++.

Product Version: UE 4.19
Tags:
more ▼

asked May 08 '18 at 10:38 AM in Rendering

avatar image

Lexeon
28 2 2 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first
more ▼

answered May 08 '18 at 02:40 PM

avatar image

Deathrey
7.8k 130 31 292

avatar image Lexeon May 10 '18 at 10:24 PM

I just found this site that pointed me in the right direction, but I will be looking at the link you provided. Thanks!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question