English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 17 July 2013, 00:24   #1
TysonJacobs
Registered User
 
Join Date: Jul 2013
Location: Nashville/USA
Posts: 10
HLSL shader problems + suggestion

I noticed a problem with my own shader, but really it seems most/all of the shaders don't work properly. My gut feeling is that the source texture dimension variables (SourceDims/TexelSize) aren't being set correctly.

Look at the D3D hq2x shader vs the native one. You can see differences and errors in the D3D version along the edges of lines (2.70 beta, using lores/normal linemode, no scaling or aspect correction):

(d3d)

(internal)


D3D 2xsai is even more of a mess:

(d3d)

(internal)


However, I tried hard-coding the source dimensions to 320x256, and there were still problems. Are there additional buffer areas in the source texture, making it larger than 320x256? Or maybe this is not the real issue.

Also, I have a suggestion: Would it make sense, for the 1st shader pass (the user-shader one), for all of the scaling/aspect ratio corrections/etc to happen in this step? And then the second pass would only do the masks/overlay and whatever other non-scaling adjustments need to be done? This way, shaders would have both the source dimensions and the output dimensions available to them, and there wouldn't be a need for this middle pass. Also, scaling is almost always destructive to scanlines, so really IMO shaders should always be rendering to the final output dimensions.

Last edited by TysonJacobs; 17 July 2013 at 01:33.
TysonJacobs is offline  
Old 17 July 2013, 08:10   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,567
Attach your config because I can't duplicate it.

Make also sure hq2x is set as "0" level shader (input=amiga texture size, output=screen texture size). <0 have amiga texture size input and output. >0 have screen texture size input and output.
Toni Wilen is offline  
Old 18 July 2013, 07:10   #3
TysonJacobs
Registered User
 
Join Date: Jul 2013
Location: Nashville/USA
Posts: 10
I've found that the hq2x problem is both dependant on resolution and not reproducable on my AMD 4670, only on my 3470. Since that uses legacy drivers, it may be a driver issue, and not worth looking into.

The 2xsai shader distributed with uae is simply broken.

My bad.
TysonJacobs is offline  
Old 07 December 2013, 17:04   #4
guest.r
 
Posts: n/a
Post

Quote:
Originally Posted by TysonJacobs View Post
I've found that the hq2x problem is both dependant on resolution and not reproducable on my AMD 4670, only on my 3470. Since that uses legacy drivers, it may be a driver issue, and not worth looking into.

The 2xsai shader distributed with uae is simply broken.

My bad.
I have tested this 2xSai shader under DOSBox and it's working the same way like the built in 2xSai scaler. But it simply needs some basic conditions to operate like it should.

The optimal way looks like this (for this shader):
-the emulator takes the emulated displayable buffer part and 2x point scales it to the source texture
- it applies the shader
- source and output resolutions are irrelevant, only "texels per pixel" and sampler types matter

The shader as it works now hopes everything is OK using hires with double line mode since it "should" provide pixels 2x2 texels big in most of the cases. But hey maybe Amiga computers dynamically interlaced operating modes in their DAC at 100/120Hz (and it's either/either emulated in WinUAE atm).

I guess this multipass specs are still under development atm.

regards, guest.r
Attached Thumbnails
Click image for larger version

Name:	2xSai one pass shader.jpg
Views:	351
Size:	221.6 KB
ID:	38092   Click image for larger version

Name:	2xSai shader.jpg
Views:	360
Size:	182.6 KB
ID:	38093   Click image for larger version

Name:	2xSai software.jpg
Views:	305
Size:	183.3 KB
ID:	38094  
 
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any chance we'll see HLSL or similar CRT emulation in a future release? dekarAF support.WinUAE 57 14 November 2015 16:45
Scanline shader problem TysonJacobs support.WinUAE 3 26 July 2013 09:43
HLSL/CG Shaders and xBR Enverex support.FS-UAE 11 19 July 2013 16:44
Please help me with my shader! tjcbs support.WinUAE 3 02 February 2013 21:49
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 06:56.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07042 seconds with 13 queries