summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/PixelShaderGen.cpp
AgeCommit message (Collapse)Author
2015-09-01Merge pull request #2894 from Sonicadvance1/no_more_eaten_canaryMarkus Wick
Fix the shader overrunning our max shader size.
2015-06-06VideoBackends: Allow the viewport to use the full depth range.Jules Blok
2015-05-26D3D: Depth range inversion.galop1n
Credits go to Galop1n for designing this technique and to BhaaLseN for cleaning up the commit.
2015-05-25Merge pull request #2274 from degasus/disable_bboxRyan Houdek
Disable bbox
2015-05-25Set copyright year to when a file was createdTillmann Karras
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-05-25VideoCommon: Make BBox emulation optionaldegasus
2015-05-13PixelShaderGen: apply zfreeze before ztexturesdegasus
The zfreeze option freezes the depth plane of the rasterization. So this is done before the TEV stages, where the z-textures are applied.
2015-05-08PixelShaderGen: Clamp zCoord to the depth range.Jules Blok
2015-05-08PixelShaderGen: Use new multiplier everywhere and directly cast to int ↵Jules Blok
instead or rounding.
2015-05-08VideoBackends: Use proper floating point depth precision.Jules Blok
2015-04-23Fix OpenGLES 3.0 on Qualcomm's crappy driver, it can't bitshift sometimes.Dwayne Slater
[fixed lint issues and grammar ~comex]
2015-02-21Merge pull request #2075 from magumagu/titantron-fixMarkus Wick
Partially fix WWE12 titantron videos.
2015-02-21Fix regression with directx when zfreeze=true and ztest=false.Scott Mansell
2015-02-18Partially fix WWE12 titantron videos.magumagu
The obvious question here is, why does it matter if we round or truncate? The key is that GC/Wii does fixed-point interpolation, where PC GPUs do floating-point interpolation. Discarding fractional bits makes the conversion from floating-point to fixed point give more consistent results. I'm not confident this is really the right fix, or that my explanation is completely correct; ideally, we don't want to depend on floating-point interpolation at all.
2015-01-23A few small cleanups based on code review.Scott Mansell
2015-01-23Fixes Mario Tennis Gimmick Courts and adds support for FastDepthCalcNanoByte011
- Calculate ZSlope every flush but only set PixelShader Constant on Reset Buffer when zfreeze - Fixed another Pixel Shader bug in D3D that was giving me grief
2015-01-23Make zfreeze use screenspace coordinates independant of IR.Scott Mansell
OpenGL requires the y coordinates to be flipped. Also refactored PixelGen code to remove duplicate code.
2015-01-23Fix various issues with zfreeze implemntation.Scott Mansell
Results are still not correct, but things are getting closer. * Don't cull CULLALL primitives so early so they can be used as reference planes. * Convert CalculateZSlope to screenspace coordinates. * Convert Pixelshader to screenspace coordinates (instead of worldspace xy coordinates, which is totally wrong) * Divide depth by 2^24 instead of clamping to 0.0-1.0 as was done before. Progress: * Rouge Squadron 2/3 appear correct in game (videos in rs2 save file selection are missing) * Shadows draw 100% correctly in NHL 2003. * Mario golf menu renders correctly. * NFS: HP2, shadows sometimes render on top of car or below the road. * Mario Tennis, courts and shadows render correctly, but at wrong depth * Blood Omen 2, doesn't work.
2015-01-23Initial port of zfreeze branch (3.5-1729)NanoByte011
Initial port of original zfreeze branch (3.5-1729) by neobrain into most recent build of Dolphin. Makes Rogue Squadron 2 very playable at full speed thanks to recent core speedups made to Dolphin. Works on DirectX Video plugin only for now. Enjoy! and Merry Xmas!!
2015-01-21Lighting Attenuation FixesNanoByte011
2015-01-21Merge pull request #1869 from Stevoisiak/GeneralConsistencyRyan Houdek
Minor consistency changes
2015-01-20PixelShaderGen: Fix uninitialized variables.Jules Blok
2015-01-12Minor consistency changesStevoisiak
Mostly small changes, like capitalization and spelling
2015-01-03Move worldpos into it's own varying.Scott Mansell
Previously it was packed into spare slots in clippos.xy and normal.w, but it's ugly and more importantly it's causing bugs. This was discovered during the debugging of a zfreeze branch, which expected clippos.xy to be xy position coordinates in clipspace (as the name suggested). Turns out the stereoscopy shader had also run into this trap, modifying clippos.x (introducing errors with per-pixel lighting). This commit has been moved outside of the zfreeze PR for fast merging.
2014-12-28PixelShaderGen: Don't assign to input variables.Jules Blok
2014-12-28VideoCommon: Don't pass structs between shaders, use the interface blocks ↵Jules Blok
instead.
2014-12-22OGL: fix ssbo based bbox supportdegasus
2014-12-19VideoCommon: Don't specify the redundant in/out qualifier if ↵Jules Blok
GL_ARB_shading_language_420pack is supported. Some driver developers interpreted "can" as "must" in the OpenGL specs. (I'm looking at you AMD)
2014-12-19VideoCommon: Add in/out qualifiers to centroid storage qualifier.Jules Blok
Fixes shaders for GPUs that don't support GL_ARB_shading_language_420pack.
2014-12-18VideoCommon: Don't pass structs between shader stages when geometry shaders ↵Jules Blok
are unsupported.
2014-12-18VideoCommon: Only use interface blocks when geometry shaders are supported.Jules Blok
2014-12-18VideoCommon: Pass interface blocks between shader stages to resolve naming ↵Jules Blok
conflicts.
2014-12-15VideoCommon: Assume we always use a geometry shader, not just for stereoscopy.Jules Blok
2014-12-14ShaderGen: Remove the GS_OUTPUT struct for OpenGL.Jules Blok
And remove the generator for it since it is no longer used outside of the geometry shader.
2014-12-14D3D: Define decimals in floating point numbersJules Blok
2014-12-14PixelShaderGen: Sample the correct texture slice.Jules Blok
2014-12-14D3D: Add geometry shader stereoscopy support.Jules Blok
2014-12-09PixelShaderGen: merge OGL+D3D bboxdegasus
2014-12-08Merge pull request #1657 from Tinob/masterMarkus Wick
Add HW bounding Box support to d3d backend
2014-12-05Common: Remove locale based functions from CommonFuncs.Lioncash
Since %f isn't used anymore in the shader generators, these can go.
2014-12-05Add HW bounding Box support to d3d backendRodolfo Bogado
2014-12-03Works around broken Intel Windows video drivers.Ryan Houdek
Just use regular boolean negation in our pixel shader's depth test everywhere except on Qualcomm. This works around a bug in the Intel Windows driver where comparing a boolean value against true or false fails but boolean negation works fine. Quite silly. Should fix issues #7830 and #7899.
2014-11-23ShaderGen: Only pass VS_OUTPUT between shaders if stereo 3D is enabled.Jules Blok
GLSL130 doesn't support passing structs between shaders. This is not a problem for stereo 3D which has a GLSL150 requirement.
2014-11-23VideoConfigDiag: Add stereoscopy options group.Jules Blok
2014-11-23ShaderGen: Rename "eye" to "layer".Jules Blok
Keeping things generic.
2014-11-23ShaderGenCommon: Move uniforms into a common static string.Jules Blok
2014-11-23ShaderGen: Handle ShaderCode objects directly.Jules Blok
ShaderGeneratorInterface does not have virtual function members, so we have to implement each type explicitly.
2014-11-23ShaderGen: Add a stereoscopy flag in the UID data.Jules Blok
2014-11-23PixelShaderGen: Sample the correct texture layer.Jules Blok