Results 1 to 4 of 4
  1. #1

    Default How do I use StaticSwitch in material functions with a texture?

    Hi,

    I'm trying to create a material function that allows me to swap between using either one of the RGB channels, essentially texture packing. I'm trying to create a base material that I can create a material instance and have control over what channel to use.

    currently i have my a texture same with each channel (minus alpha) connected to its own StaticSwitch with a FunctionInput(staticBool) plugged into the Value. a 0 vector 1 node is plugged into the False.

    and inside the base material i have 3 StaticBaseParameters, one of each slot in the material function and a slot for the texture parameter.

    unfortunately this yields and error "Cannot cast from float4 to texture2D".

    I'm pretty sure i'm going at this the wrong way but any guidance would be greatly appreciated!

    thanks,
    Jason

  2. #2
    Palace Guard

    Join Date
    Jun 2007
    Location
    Christchurch
    Posts
    3,514

    Default

    Show a screenshot of your Material.

  3. #3

    Default

    sorry, wrote it on my phone. wasn't near a comptuer.

    but here's a screen of my material function and material




  4. #4
    Palace Guard

    Join Date
    Jun 2007
    Location
    Christchurch
    Posts
    3,514

    Default

    Not sure why you're using this when StaticComponentMaskParameter exists.

    http://udn.epicgames.com/Three/Mater...tMaskParameter


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.