User Tag List

Page 5 of 7 FirstFirst ... 3 4 5 6 7 LastLast
Results 41 to 50 of 61

Thread: Converting DX9 shaders to DX11

  1. #41
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleSWF Export ModuleFirefly 3D Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    fnkycoldmadeanr's Avatar
    Join Date
    Jul 2017
    Location
    Melbourne, Australia
    Posts
    249
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    @Camomano99 @Eurobercik @piscesdreams

    Does anyone know the original author for this?

    Are you on the community Discord @piscesdreams?


    Water DX11
    WaterDX11.zip

  2. #42
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleXNA Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    piscesdreams's Avatar
    Join Date
    Dec 2007
    Location
    United States
    Posts
    1,059
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    @fnkycoldmadeanr You save the day again! I can't thank you enough, seriously.

    I don't know the original author of this particular shader. I am unsure if I found it on this thread or somewhere else, but did find it strange there was no author info.

    I'm not on the Discord, but probably should get on there at some point. I honestly don't really use Discord, but should probably change that at some point.

    Thank you again - many, many thanks!!

  3. #43
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,740
    Mentioned
    133 Post(s)
    Tagged
    0 Thread(s)
    Could somebody please convert this ZoomBox shader for me? I tried to do it myself but I probably did something wrong because I got an error when I tried to compile the fxc file using defisym's tool.

    The shader is by @muddymole from this thread

    This is the XML file:

    Code:
    <effect>
    <name>ZoomBox</name>
    <description>Displays a window containing a zoomed portion of the background.</description>
    <author>Sketchy/MuddyMole</author>
    	<parameter>
    		<name>sourceX</name>
    		<code>sourceX</code>
    		<description>The x position of the source box</description>
    		<type>int</type>
    		<property>edit</property>
    	</parameter>
    	<parameter>
    		<name>sourceY</name>
    		<code>sourceY</code>
    		<description>The y position of the source box</description>
    		<type>int</type>
    		<property>edit</property>
    	</parameter>
    	<parameter>
    		<name>sourceWidth</name>
    		<code>sourceWidth</code>
    		<description>The width of the source box</description>
    		<type>int</type>
    		<property>edit</property>
    	</parameter>
    	<parameter>
    		<name>sourceHeight</name>
    		<code>sourceHeight</code>
    		<description>The height of the source box</description>
    		<type>int</type>
    		<property>edit</property>
    	</parameter>
    	<parameter>
    		<name>windowX</name>
    		<code>windowX</code>
    		<description>The x position of the window</description>
    		<type>int</type>
    		<property>edit</property>
    	</parameter>
    	<parameter>
    		<name>windowY</name>
    		<code>windowY</code>
    		<description>The y position of the window</description>
    		<type>int</type>
    		<property>edit</property>
    	</parameter>
    	<parameter>
    		<name>windowWidth</name>
    		<code>windowWidth</code>
    		<description>The width of the window</description>
    		<type>int</type>
    		<property>edit</property>
    	</parameter>
    	<parameter>
    		<name>windowHeight</name>
    		<code>windowHeight</code>
    		<description>The height of the window</description>
    		<type>int</type>
    		<property>edit</property>
    	</parameter>
    <BackgroundTexture>1</BackgroundTexture>
    </effect>
    This is the FX code:

    Code:
    sampler2D bkd : register(s1);
    int sourceX, sourceY, sourceWidth, sourceHeight, windowX, windowY, windowWidth, windowHeight;
    float fPixelWidth, fPixelHeight;
    
    float4 ps_main( in float2 In : TEXCOORD0 ) : COLOR0 {
    	
    	float4 outColor = float4( 0, 0, 0, 0 );
    
    	float wndMinX = windowX * fPixelWidth;
    	float wndMaxX = ( windowX + windowWidth ) * fPixelWidth;
    	float wndMinY = windowY * fPixelHeight;
    	float wndMaxY = ( windowY + windowHeight ) * fPixelHeight;
    
    	if ( In.x >= wndMinX && In.x <= wndMaxX && In.y >= wndMinY && In.y <= wndMaxY ) {
    		float srcMinX = sourceX * fPixelWidth;
    		float srcMaxX = ( sourceX + sourceWidth ) * fPixelWidth;
    		float srcMinY = sourceY * fPixelHeight;
    		float srcMaxY = ( sourceY + sourceHeight ) * fPixelHeight;		
    		float posX = ( In.x - wndMinX ) / ( wndMaxX - wndMinX );
    		float posY = ( In.y - wndMinY ) / ( wndMaxY - wndMinY );
    		float2 posXY = float2( lerp( srcMinX, srcMaxX, posX ), lerp( srcMinY, srcMaxY, posY ));
    		outColor = tex2D( bkd, posXY );
    	}
    
    	return outColor;
    }
    
    technique tech_main {
    	pass P0 {
    		PixelShader = compile ps_2_a ps_main();
    	}
    }
    This is my attempt to create the HLSL file from the FX code:

    Code:
    struct PS_INPUT
    {
      float2 texCoord : TEXCOORD0;
    };
    
    Texture2D<float4> bkd : register(t1);
    	sampler bkdSampler : register(s1);
    
    
    cbuffer PS_VARIABLES : register(b0)
    {
    int sourceX;
    int sourceY;
    int sourceWidth;
    int sourceHeight;
    int windowX;
    int windowY;
    int windowWidth;
    int windowHeight;
    };
    
    cbuffer PS_PIXELSIZE : register(b1)
    {
    	float fPixelWidth;
    	float fPixelHeight;
    };
    
    float4 ps_main( in PS_INPUT In ) : SV_TARGET {
    	
    	float4 outColor = float4( 0, 0, 0, 0 );
    
    	float wndMinX = windowX * fPixelWidth;
    	float wndMaxX = ( windowX + windowWidth ) * fPixelWidth;
    	float wndMinY = windowY * fPixelHeight;
    	float wndMaxY = ( windowY + windowHeight ) * fPixelHeight;
    
    	if ( In.x >= wndMinX && In.x <= wndMaxX && In.y >= wndMinY && In.y <= wndMaxY ) {
    		float srcMinX = sourceX * fPixelWidth;
    		float srcMaxX = ( sourceX + sourceWidth ) * fPixelWidth;
    		float srcMinY = sourceY * fPixelHeight;
    		float srcMaxY = ( sourceY + sourceHeight ) * fPixelHeight;		
    		float posX = ( In.x - wndMinX ) / ( wndMaxX - wndMinX );
    		float posY = ( In.y - wndMinY ) / ( wndMaxY - wndMinY );
    		float2 posXY = float2( lerp( srcMinX, srcMaxX, posX ), lerp( srcMinY, srcMaxY, posY ));
    		outColor = bkd.Sample(bkdSampler, xy)* In.Tint;
    				
    	}
    
    	return outColor;
    }
    This is the error defisym's tool gave me when I tried to compile the HLSL-->FXC:

    ZoomBox.hlsl(37,7-10): error X3018: invalid subscript 'x'
    Thanks!

  4. #44
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleSWF Export ModuleFirefly 3D Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    fnkycoldmadeanr's Avatar
    Join Date
    Jul 2017
    Location
    Melbourne, Australia
    Posts
    249
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Volnaiskra View Post
    Could somebody please convert this ZoomBox shader for me? ...



    Thanks!
    ZoomBox.zip


    So close

    In.x in dx11 becomes In.texCoord.x
    xy should have been PosXY

  5. #45
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,740
    Mentioned
    133 Post(s)
    Tagged
    0 Thread(s)
    Excellent! Thanks so much, fnky!

  6. #46
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2014
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can someone do the conversion for direct x 11?
    https://clickstore.clickteam.com/photoshop_blend_modes

  7. #47
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    774
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    @Kage these are all already ported, I believe most of these ports comes with Fusion updates, but for unknown reasons some users don't receive the files.
    These hlsl/fxc files must be on the same exact directory as the .xml/.fx files for it to work, so perhaps you just have it in different folders.

    Effects - Original ports.zip

    Also, please verify your new products, just so people can tell you own certain DLCs.

  8. #48
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2014
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    these are new shaders that have been modified to work with transparency. Have they already been updated?

  9. #49
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    774
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Ah, okay, I can port it, might take a bit of time since it's quite a lot tho.

  10. #50
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2014
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    these shaders create cool lightings effect. This is the difference from the old and new ones, can you please update them?
    Click image for larger version. 

Name:	P3-2-542x372.jpg 
Views:	19 
Size:	40.2 KB 
ID:	30745

Page 5 of 7 FirstFirst ... 3 4 5 6 7 LastLast

Similar Threads

  1. Replies: 4
    Last Post: 6th November 2014, 04:44 PM
  2. Flipping(giant, high animated) active objects without shaders(or any better shaders?)
    By DinnerSonic in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 24th September 2013, 01:57 PM
  3. Curious on converting pixel shaders to background
    By Pixelthief in forum Hardware Accelerated Runtime
    Replies: 13
    Last Post: 3rd May 2010, 08:01 PM
  4. Converting to Hex
    By XanderChaos in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 9th February 2009, 06:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •