Commit graph

176 commits

Author SHA1 Message Date
wwylele 7c5a76e58b log: replace all NGLOG with LOG 2018-06-29 14:18:07 +03:00
NarcolepticK 9ae70e733f video-core: Migrate logging macros (#3878)
* video-core: Migrate logging macros

* video-core: Fixed missed clang format

* video-core: Migrated LOG_GENERIC macro
2018-06-29 00:13:30 +03:00
Weiyi Wang 80f6510355
Merge pull request #3851 from wwylele/shut-up-texture3
gl_shader_gen: lower log level of using disabled proctex
2018-06-28 18:03:05 +03:00
Markus Wick 46f18d6800 gl_shader_gen: Inline now constant texture buffer. 2018-06-22 17:20:55 +02:00
Markus Wick 831d4f9aeb gl_rasterizer: Use the shared texture buffer for the proctex lut. 2018-06-22 17:20:55 +02:00
Markus Wick 1ca6d2ea8d gl_rasterizer: Use the shared texture buffer for the noise, color and alpha map. 2018-06-22 17:20:55 +02:00
Markus Wick 63fb7dcc1b gl_rasterizer: Use the shared texture buffer for the fog lut. 2018-06-22 17:20:55 +02:00
Markus Wick 4679487640 gl_rasterizer: Use the shared texture buffer for the lighting lut. 2018-06-22 17:20:54 +02:00
Markus Wick a8396cdbed renderer_opengl: Create shared texture buffer. 2018-06-22 17:05:40 +02:00
Markus Wick 10fba63b94 gl_rasterizer: Provide texture buffer offsets.
This allows us to move all data into one TBO.
2018-06-22 17:03:38 +02:00
wwylele 2f9b7bdfa9 gl_shader_gen: lower log level of using disabled proctex 2018-06-20 18:34:01 +03:00
wwylele 781912e854 gl_rasterize: implement shadow mapping using image load/store 2018-06-01 14:26:44 +03:00
wwylele 92a1252835 gl_shader_gen: rearrange function definition to avoid suprious warnings 2018-05-19 00:36:33 +03:00
wwylele 06815ec905 video_core: receive hardware shader settings 2018-05-14 10:17:35 +03:00
wwylele 191b29e402 gl_shader_gen: generate programmable vs/gs and fixed gs 2018-04-24 20:39:10 +03:00
Weiyi Wang cb36f9fad2
Merge pull request #3645 from wwylele/shader-manager
renderer_opengl: refactor shader & program objects and add shader manager for rasterizer
2018-04-16 16:38:38 +03:00
Weiyi Wang bfd1d963ba
Merge pull request #3638 from ds84182/we-need-more-rounds
Round TEV outputs and the final fragment output in GLSL
2018-04-12 23:32:27 +03:00
wwylele 36bc92273b gl_shader_gen: accept an option to generate separable shaders 2018-04-11 14:52:37 +03:00
wwylele 4256641da4 gl_rasterizer/lighting: implement shadow attenuation 2018-04-10 20:26:55 +03:00
wwylele b5763cb952 pica/lighting: split FresnelSelector into bitfields
The FresnelSelector was already working like a bitfield, so just make it actual bitfield to reduce redundant code. Also, it is already confirmed that this field also affects shadow on alpha. Given that the only two source that can affect alpha components are both controlled by this field, this field should be renamed to a general alpha switch
2018-04-10 20:25:56 +03:00
Dwayne Slater 234161ba62 Make byteround less expensive (thanks hrydgard!) 2018-04-07 18:26:14 -04:00
Dwayne Slater 734279ff22 Round TEV outputs and the final fragment output in GLSL
Fixes water effect in SM3DL
2018-04-07 16:43:56 -04:00
Weiyi Wang 972db17247
Merge pull request #3497 from wwylele/texture-cube-new
gl_rasterizer: implement TextureCube
2018-04-06 12:41:40 +03:00
Weiyi Wang acb02d300c
Merge pull request #3518 from wwylele/hashable-struct
Common/Hash: abstract HashableStruct from GLShader::PicaShaderConfig
2018-04-05 14:39:12 +03:00
wwylele 30cc8c10cd
Common/Hash: abstract HashableStruct from GLShader::PicaShaderConfig 2018-03-14 00:12:40 +02:00
wwylele 15e8664ef7 gl_rasterizer: implement texture cube 2018-03-10 01:15:06 +02:00
wwylele 92c7bb9d20 pica/gl_shader: optimize ternary operator 2018-03-10 01:14:05 +02:00
wwylele 0d6db4a0b3 lighting: compute highlight clamp after one-/two-sided diffuse pass 2018-03-10 01:14:05 +02:00
James Rowe f61141e86a Update the entire application to use the new clang format style 2018-03-09 10:54:43 -07:00
Vamsi Krishna 04cc8fb537 Discard Gas mode renders (#3486)
* Discard gas_mode renders

This discards the gas_mode / fog effect from games that use it and allows the games to display without it.  Note that gas mode is still unimplemented and will LOG<CRITICAL>.
This bypasses #3287. (Doesn't fix it)

* fix clang
2018-03-07 18:02:36 -05:00
Weiyi Wang 4befbddc34
Merge pull request #3281 from jroweboy/texcache-pt2
Texture Cache Rework
2018-03-05 11:57:25 +02:00
Yuri Kunde Schlesner d93ee65164 Common: Add convenience function for hashing a struct 2018-01-15 13:43:37 -08:00
James Rowe c821c14908 Settings: Change resolution scaling to an integer instead of a float 2017-12-23 16:10:25 -07:00
Dwayne Slater fcc141a327 Maintain the PICA's 8 bits of color precision when using the interpolated primary color
This matches the software renderer by using round.
The actual hardware rounds the results up instead of flooring.
2017-11-29 16:49:04 -05:00
wwylele 47c0c87c47 video_core: clean format warnings 2017-11-01 12:35:32 +02:00
Yuri Kunde Schlesner 699c920991 Merge pull request #2900 from wwylele/clip-2
PICA: implement custom clip plane
2017-09-16 10:23:00 +02:00
bunnei ff4941fb3a Merge pull request #2914 from wwylele/fresnel-fix
pica/lighting: only apply Fresnel factor for the last light
2017-09-05 10:00:49 -04:00
wwylele 12fbc8c8df pica/lighting: only apply Fresnel factor for the last light 2017-09-03 08:22:03 +03:00
wwylele e2c41a5891 video_core: report telemetry for gas mode 2017-08-31 12:54:17 +03:00
bunnei f0e461bf6f Merge pull request #2891 from wwylele/sw-bump
SwRasterizer/Lighting: implement bump mapping
2017-08-30 21:07:30 -04:00
wwylele addbcd5784 gl_rasterizer: implement custom clip plane 2017-08-25 07:26:45 +03:00
wwylele 17c6104d2a gl_rasterizer/lighting: more accurate CP formula 2017-08-22 09:34:44 +03:00
wwylele 5a4af616c6 gl_shader_gen: simplify and clarify the depth transformation between vertex shader and fragment shader 2017-08-21 08:03:07 +03:00
wwylele 1eca380886 gl_rasterizer: add clipping plane z<=0 defined in PICA 2017-08-21 08:03:07 +03:00
wwylele 686fb3e78c gl_shader_gen: don't call SampleTexture when bump map is not used 2017-08-11 18:35:00 +03:00
wwylele 8482933db8 gl_rasterizer: use texture buffer for proctex LUT 2017-07-01 11:02:48 +03:00
wwylele 8978ecb09c gl_rasterizer: use texture buffer for fog LUT 2017-06-22 20:41:00 +03:00
wwylele ab60414122 gl_rasterizer/lighting: fix LUT interpolation 2017-06-21 23:13:06 +03:00
wwylele 5a454173a8 gl_rasterizer/lighting: use the formula from the paper for germetic factor 2017-06-18 10:29:02 +03:00
wwylele 7052d43a67 gl_rasterizer/lighting: implement geometric factor 2017-06-15 14:59:01 +03:00
wwylele 972548e3ee gl_rasterizer/lighting: Implement tangent mapping 2017-06-11 21:30:53 +03:00
wwylele 40b7d0bf3f gl_rasterizer/lighting: implement lut input 5 (CP) 2017-06-11 21:30:53 +03:00
Sebastian Valle 39c7c1f580 Merge pull request #2727 from wwylele/spot-light
Fragment lighting: implement spot light
2017-06-11 18:23:47 +00:00
wwylele 10906dceec gl_rasterizer: implement spot light 2017-05-30 10:54:58 +03:00
wwylele 686cbf3ac6 gl_rasterizer: sync spot light status 2017-05-30 10:54:58 +03:00
Yuri Kunde Schlesner 3df85a103a Merge pull request #2729 from yuriks/quaternion-fix
OpenGL: Improve accuracy of quaternion interpolation
2017-05-28 01:24:06 -07:00
Yuri Kunde Schlesner 669ef82aee OpenGL: Improve accuracy of quaternion interpolation
Current order of operations (rotate then normalize) seems to produce a
lot more distortion than normalizing and then rotating. This makes Citra
results match pretty closesly with hardware, and indicates that hardware
may also be using lerp instead of slerp to interpolate the quaternions.
2017-05-27 00:13:41 -07:00
wwylele 90c8d09098 gl_shader: refactor texture sampler into its own function 2017-05-27 01:56:22 +03:00
wwylele 4d62e75fb2 gl_rasterizer: implement procedural texture 2017-05-20 13:50:50 +03:00
wwylele 039b293092 pica: shader_dirty if texture2 coord changed 2017-05-05 15:35:17 +03:00
wwylele 0f664ef89d pica: use correct coordinates for texture 2 2017-05-03 22:12:46 +03:00
bunnei ea53d6085a Merge pull request #2671 from wwylele/dot3-rgba
rasterizer: implement combiner operation 7 (Dot3_RGBA)
2017-04-21 17:03:22 -04:00
wwylele 2c2e872b31 gl_shader_gen: remove TODO about Lerp behaviour verification. The implementation is verified against hardware 2017-04-20 22:56:07 +03:00
wwylele b624a95205 rasterizer: implement combiner operation 7 (Dot3_RGBA) 2017-04-19 23:48:10 +03:00
Yuri Kunde Schlesner 52a4489d65 OpenGL: Pass Pica regs via parameter 2017-04-17 10:34:45 -07:00
Yuri Kunde Schlesner a6fd4533f6 OpenGL: Move PicaShaderConfig to gl_shader_gen.h
Also move the implementation of CurrentConfig to the cpp file.
2017-04-16 21:49:32 -07:00
Yuri Kunde Schlesner 60fc0b086f VideoCore: Split regs.h inclusions 2017-02-09 00:04:24 -08:00
Yuri Kunde Schlesner 5759d94b5c VideoCore: Move Regs to its own file 2017-02-04 13:59:12 -08:00
Yuri Kunde Schlesner f443c7e5b0 VideoCore: Split lighting regs from Regs struct 2017-02-04 13:59:11 -08:00
Yuri Kunde Schlesner 23713d5dee VideoCore: Split framebuffer regs from Regs struct 2017-02-04 13:59:11 -08:00
Yuri Kunde Schlesner 9017093f58 VideoCore: Split texturing regs from Regs struct 2017-02-04 13:59:09 -08:00
Yuri Kunde Schlesner 000e78144c VideoCore: Split rasterizer regs from Regs struct 2017-02-04 13:08:47 -08:00
Jannik Vogel 6ed4206f87 Minor cleanup in GLSL code 2016-12-25 21:38:10 +01:00
Jannik Vogel 88f409aec9 Offset lighting LUT samples correctly 2016-12-25 21:37:26 +01:00
Yuri Kunde Schlesner 01667d9a35 OpenGL: Take cached viewport sub-rect into account for scissor
Fixes #1938
2016-09-29 20:55:24 -07:00
Yuri Kunde Schlesner 84fbbe2629 Use negative priorities to avoid special-casing the self-include 2016-09-21 00:15:56 -07:00
Emmanuel Gil Peyrot ebdae19fd2 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
2016-09-21 11:15:47 +09:00
Yuri Kunde Schlesner 396a8d91a4 Manually tweak source formatting and then re-run clang-format 2016-09-18 21:14:25 -07:00
Emmanuel Gil Peyrot dc8479928c Sources: Run clang-format on everything. 2016-09-18 09:38:01 +09:00
Jannik Vogel 7a79fa7a90 OpenGL: Avoid error on unsupported lighting LUT 2016-08-30 19:30:26 +02:00
Yuri Kunde Schlesner ecf6ecf325 OpenGL: Add scaled resolution support to scissor 2016-06-27 22:16:04 -07:00
Yuri Kunde Schlesner f0b9bc14b6 PICA: Scissor fixes and cleanups 2016-06-27 21:14:39 -07:00
Subv f9be06b15f PICA: Implement scissor test 2016-06-27 21:14:13 -07:00
Jannik Vogel a12571c709 OpenGL: Implement fog 2016-06-07 00:06:28 +02:00
Jannik Vogel c900c092e3 OpenGL: Avoid undefined behaviour for UNIFORM_BLOCK_DATA_SIZE 2016-06-07 00:06:28 +02:00
Jannik Vogel 068bd6f728 OpenGL: Use uniforms for dist_atten_bias and dist_atten_scale 2016-05-23 23:28:13 +02:00
Jannik Vogel 5a7306d6df OpenGL: Implement texture type 3 2016-05-11 08:07:37 +02:00
Jannik Vogel fc9cc21024 OpenGL: Implement W-Buffers and fix depth-mapping 2016-05-10 08:58:52 +02:00
Jannik Vogel f74652d2fe Pica: Use a union for PicaShaderConfig 2016-05-03 15:06:49 +02:00
Jannik Vogel 5fc8eb227a Pica: Add TevStageConfigRaw to PicaShaderConfig (MSVC workaround) 2016-05-03 15:06:46 +02:00
Emmanuel Gil Peyrot 691a42fe98 VideoCore: Run include-what-you-use and fix most includes. 2016-04-30 17:02:41 +01:00
Jannik Vogel 0ad050f85d OpenGL: Implement color combiner Operation::Dot3_RGB 2016-04-10 15:31:24 +02:00
bunnei 9dfb223d26 gl_rasterizer: Initial implementation of bump mapping. 2016-02-05 17:20:19 -05:00
bunnei 449902b558 gl_shader_gen: Fix bug in LUT range (should within range [0, 255] not [0, 256]). 2016-02-05 17:20:17 -05:00
bunnei 348c9c9ff3 gl_shader_gen: Implement lighting red, green, and blue reflection. 2016-02-05 17:20:16 -05:00
bunnei 01b407638c gl_shader_gen: View should be normalized. 2016-02-05 17:20:15 -05:00
bunnei c37de30cfc gl_shader_gen: Implement fragment lighting fresnel effect. 2016-02-05 17:20:13 -05:00
bunnei 0e67c21c9e gl_shader_gen: Implement fragment lighting specular 1 component. 2016-02-05 17:19:16 -05:00
bunnei 781b046579 gl_shader_gen: Add support for D0 LUT scaling. 2016-02-05 17:18:36 -05:00
bunnei 3d89dacd56 gl_shader_gen: Refactor lighting config to match Pica register naming.
- Also implement D0 LUT enable.
2016-02-05 17:17:35 -05:00