Assignment Goals

The primary goals of this assignment are:

  1. Extend the core Unreal Engine code.
  2. Make a change with minimal guidance.
  3. Develop your own testing strategy for your change.

The Unreal Engine internally supports 32-bit per channel single-precision floating point textures on the GPU (pixel format PF_A32B32G32R32F), but the FTextureSource class does not, so it is not possible to import a 32-bit texture from outside UE4. For this assignment, you'll be adding a new TSF_RGBA32F floating point source format to Texture.h, and making any changes necessary to allow you to hand floating point data (e.g. from a float or FLinearColor array) directly to FTextureSource::Init() to initialize a floating point texture resource.

Do not worry about existing places elsewhere in the engine that use FTextureSource::Init with TSF_RGBA16F. Many of these could be changed to use your new format, but that is outside the scope of this assignment. Also, do not worry about exporting data from a float texture, or converting a floating point render target to a floating point texture. A full addition of 32-bit float as a texture type should include these as well, but once again this is outside the scope of what I intend you to tackle for this assignment.


  1. Create a a Blank C++ project with no starter content called assn7.
    • Though your implementation code will be in the engine, your testing code will be in the project.
    • As usual, put the project at the top level of your git repository
  2. Build a test case
    • You could do it as an asset creation or import factory, or as actor code that creates or updates an existing texture object.
    • I recommend initially building your test code to work with an existing texture source format so you can test your test code independently from your texture source format changes.
  3. Make the changes you think you will need to support 32-bit floating point texture initialization
    • As usual, edits to cpp files will just cause a rebuild of the module where they are, but this time you will need to make some changes to Texure.h (e.g. adding TSF_RGBA32F to the ETextureSourceFormat enum). This header file is used in many other modules, so edits to it will cause a rebuild of about half the engine. Try to make any necessary changes to this file only once.
  4. Create a test that initializes a texture with 32-bit float data.
    • You are responsible for finding or creating the test data, and confirming that the results are correct.
    • One option would be to use RenderDoc to confirm the texture format and data. Another option might be to initialize with data that can be represented in PF_A32B32G32R32F, but not 16-bit PF_FloatRGBA, then test for those values in a custom material node.


For full credit, you must commit multiple times during your development.

Add an assn7.txt. Tell us what works and what doesn't, and anything else you think we should know for grading.

Include a detailed explanation of what you did to test, and how you know it worked. Include any screen shots or output logs necessary to show your testing worked. Tell us what to look for in these files to confirm success.

Push to your repository, and tag your final commit with an assn7 tag.