Commit graph

151 commits

Author SHA1 Message Date
Lioncash
cd201cd60f gl_shader_gen: Make use of fmt where applicable
Avoids string churn and makes it significantly easier to read the shader
template strings that are being used as the basis for formatting.
2020-05-08 14:50:48 -04:00
Mat M
8b43dff849
gl_shader_gen: Convert file-scope std::string into a std::string_view (#5263)
Same behavior, no heap allocations at program start up
2020-04-21 20:31:58 -05:00
James Rowe
cf4125a6a5 Only load precompiled shaders if their sanitize_mul setting matches 2020-01-15 21:10:37 -07:00
Pengfei Zhu
4bc22aa350
Merge pull request #4918 from vitor-k/warnings
Silence warnings from unused code and mismatched declaration
2019-09-06 22:08:06 +08:00
vitor-k
61f9710d95 remove unused call to nodiscard function 2019-09-05 17:11:38 -03:00
Weiyi Wang
dd3ba7bd21 opengl: remove hw geometry shader related stuff 2019-08-18 20:07:50 -04:00
weihuoya
899e3eb003 minor fix for opengles 2019-07-28 21:18:38 +08:00
Weiyi Wang
909d04ddea Remove unused stuff
Some unused variables are still kept in services, as they are parameters passed from the command buffer and might be used in the future
2019-07-16 20:27:03 -04:00
Aner Torre
4b0ce1b770 video_core: Fix fragment_shader compilation failure due to different type variable multiplication 2019-05-19 14:45:41 +02:00
Weiyi Wang
0ec45f694c
Merge pull request #3910 from wwylele/mipmap
gl_rasterizer: implement mipmap by forwarding PICA mipmap configuration
2019-04-17 14:10:42 -04:00
fearlessTobi
d755a15891 fix compilation problems 2019-03-23 12:43:03 +01:00
wwylele
fa141c799b gl_shader_gen: use accurate LOD formula for texture 2D 2019-03-08 09:37:25 -05:00
Weiyi Wang
f409342ab5
Merge pull request #4613 from BreadFish64/gles5
video_core: add GLES support
2019-02-17 15:44:39 -05:00
SachinVin
d63acfc1e9 video_core: add workarounds to enable GLES support
video_core: shorten GetGLSLVersionString

video_core: make GLES version and extensions consistent

video_core: move some logic to LoadShader

video_core: deduplicate fragment shader precision specifier
2019-02-12 16:57:18 -06:00
Weiyi Wang
b5f2318ae7 gl_rasterizer: change shadow_texture_bias from shader config var to shader uniform
Games can frequently change this register. Using it as shader config var would generates a lot of shaders
2019-02-02 20:40:08 -05:00
Tobias
46e8237e7e Port yuzu-emu/yuzu#1137: "renderer_opengl: Namespace OpenGL code" (#4423)
* renderer_opengl: Namespace OpenGL code

Namespaces all OpenGL code under the OpenGL namespace.

Prevents polluting the global namespace and allows clear distinction
between other renderers' code in the future.

* Also namespace TextureCubeConfig
2018-11-16 23:29:10 -08:00
B3n30
d37a2270d6 Replace boost::optional with std::optional where possible 2018-10-05 13:51:09 +02:00
Weiyi Wang
7d8f115185 Prefix all size_t with std::
done automatically by executing regex replace `([^:0-9a-zA-Z_])size_t([^0-9a-zA-Z_])` -> `$1std::size_t$2`
2018-09-06 16:03:28 -04:00
Weiyi Wang
99f4ea999c gl_rasiterzer/proctex: revert back to round() for Nearest sampling
This change to floor() was made in 2927c88, which was a result of doing some hwtest. It turned out that it was buggy edge cases in PICA, and for most cases round() still applies
2018-09-01 09:11:15 -04:00
Weiyi Wang
78685065cf
Merge pull request #3916 from wwylele/mipmap-proctex
gl_rasterizer: implement mipmap for procedural texture
2018-07-19 11:51:57 +03:00
Weiyi Wang
7c7adc64fd
Merge pull request #3898 from wwylele/shut-up-texture5
swrasterizer, gl_shader_gen: return 0.0 for Disabled texture unit 0
2018-07-07 18:45:13 +03:00
wwylele
2927c88fd3 gl_rasterizer: implement mipmap for proctex 2018-07-06 01:13:02 +03:00
Valentin Vanelslande
b12942a231
gl_shader_gen: remove newline in logging macro 2018-06-30 19:15:15 -05:00
wwylele
4d4b833a00 swrasterizer, gl_shader_gen: return 0.0 for Disabled texture unit 0 2018-06-30 11:36:39 +03:00
wwylele
0eab948728 reformat all files with clang-format 2018-06-29 16:56:12 +03:00
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