English Amiga Board Amiga Lore


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 04 October 2016, 20:42   #1
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
Using HLSL shaders from MAME with WinUAE

Just wondering if it would be feasible to support HLSL shaders from MAME in WinUAE, so they can be used without modification.

The current MAME prescale.fx for example contains these lines:
uniform float2 ScreenDims;
uniform float2 TargetDims;
uniform float2 SourceDims;


The specifics seem to have changed over time; for instance this earlier version of prescale.fx contains these lines instead:
float TargetWidth;
float TargetHeight;
float RawWidth;
float RawHeight;


Could "ScreenDims" be the final output size, so the MAME shader could potentially be used with no final _winuae.fx shader pass???
mark_k is offline  
AdSense AdSense  
Old 07 October 2016, 21:18   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
I don't know what those parameters are (and I am not interested in finding out).

SourceDims exists already. WinUAE also has inputdims which may be same as ScreenDims. Or maybe not.
Toni Wilen is online now  
Old 09 October 2016, 23:07   #3
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
From prescale.fx:
Output.Position = float4(Input.Position.xyz, 1.0f);
Output.Position.xy /= ScreenDims;

Does that mean the shader expects Input to be in pixels, and the second line above converts it to the range [0..1]?

I've been trying to modify prescale.fx so it can work as a replacement for _winuae.fx. The rationale being, that could reduce GPU overhead and lag since only a single shader is used. No success yet since I know almost nothing about shaders and have so far been too lazy to learn.

However, WinUAE crashes on starting emulation with my modified _winuae.fx. Not sure if you'd class that as a bug, but see the attached archive with config + shader + dump file.
Attached Files
File Type: zip shader_issue.zip (23.9 KB, 26 views)
mark_k is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Corrected shaders for WinUAE guest.r support.WinUAE 20 14 August 2017 18:58
Make two shaders to work with WInUAE Leandro Jardim support.WinUAE 7 27 March 2014 11:55
HLSL/CG Shaders and xBR Enverex support.FS-UAE 11 19 July 2013 16:44
fx Shaders in WinUAE 2.6.0 crazy46guy support.WinUAE 8 16 June 2013 14:30
MAME: How to use HLSL? Leandro Jardim Retrogaming General Discussion 3 28 December 2012 02:55

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 20:40.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.10773 seconds with 12 queries