UIMask.fx - Custom file support

  • FierySwordswoman
  • Topic Author
More
8 years 5 months ago - 8 years 5 months ago #1 by FierySwordswoman UIMask.fx - Custom file support was created by FierySwordswoman
Unlike LUT.fx, UIMask.fx doesn't let you define a .png of your choosing as the texture source.
I fixed this by adding
#ifndef maskSource
   #define maskSource "UIMask.png"
#endif
after the #include, and changed line 150 (after edit) from
texture tUIMask_Mask <source="UIMask.png";> { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; Format=TEXFORMAT; };
to
texture tUIMask_Mask <source=maskSource;> { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; Format=TEXFORMAT; };

With that, you can add
sourceMask="NAME_OF_MASK.png"
to the preprocessor definitions to choose a custom image file.

I feel this would be a good feature to include in the master shaders. It adds a simple new feature consistent with other shaders without losing any previous functionality.
Last edit: 8 years 5 months ago by FierySwordswoman.

Please Log in or Create an account to join the conversation.