Commit Graph

845 Commits

Author SHA1 Message Date
Matteo Bruni 1eb6e5dd80 wined3d: Update GLSL vertex pipe replacement TODO comment.
It turns out most of that has been implemented since the comment was
originally written.
2015-07-29 20:56:44 +02:00
Matteo Bruni f2989a2522 wined3d: Only install emulation wrappers when required. 2015-07-28 13:41:48 +02:00
Matteo Bruni 53d1527945 wined3d: Avoid glBegin() / glEnd() in check_fbo_compat() when possible. 2015-07-28 13:41:46 +02:00
Matteo Bruni 4c0b1a5038 wined3d: Use GLSL 1.50 on core contexts. 2015-07-09 17:18:22 +09:00
Matteo Bruni 8839e7fb94 wined3d: Use a lookup table to select the sampler function name. 2015-07-07 21:04:05 +09:00
Józef Kucia 4a8e0ec3d6 wined3d: Implement normals transformation for vertex blending. 2015-07-03 16:51:37 +09:00
Józef Kucia 1f680c52fe wined3d: Implement vertex blending in glsl_vertex_pipe. 2015-07-03 16:51:34 +09:00
Matteo Bruni 4f57581310 wined3d: Improve NP2 fixups in GLSL PS texture sampling code. 2015-07-03 16:51:25 +09:00
Matteo Bruni a8fb1eee49 wined3d: Fix NP2 fixups in GLSL fragment FFP replacement. 2015-07-03 16:51:23 +09:00
Matteo Bruni 93c88d34a8 wined3d: Fix GLSL backend with non-GLSL vertex and pixel pipeline combination.
That can only happen by manually modifying
select_vertex_implementation() and select_fragment_implementation(),
which may be useful for testing non-default vertex / fragment pipeline
implementations.
2015-07-03 16:51:17 +09:00
Matteo Bruni af55ae1379 wined3d: Don't flag WINED3D_SHADER_CONST_FFP_PROJ on transformed <-> untransformed vdecl change.
It's unnecessary since the vertex shader is going to change and
shader_glsl_select() flags all the constants used by the shader anyway.
2015-06-19 20:30:10 +09:00
Matteo Bruni 438f68cc38 wined3d: Drop unused gl_info parameter from shader_glsl_ffp_vertex_lighting(). 2015-06-19 20:30:07 +09:00
Matteo Bruni f6e7e01744 wined3d: Cleanup and simplify texture sampling code generation.
Makes it easier to support the different names and syntax in GLSL 1.50
in the (hopefully) near future.
2015-06-17 20:01:19 +09:00
Matteo Bruni 170dca7741 wined3d: Handle per-vertex point size in the GLSL FFP replacement. 2015-06-17 20:01:19 +09:00
Henri Verbeet c9227bccc5 wined3d: Implement SM4 discard in the GLSL shader backend. 2015-06-15 22:10:35 +09:00
Matteo Bruni 4189d29776 wined3d: Avoid the builtin GLSL vertex attributes. 2015-06-12 21:23:12 +09:00
Stefan Dösinger dc7cb59c3a wined3d: Keep track of renderbuffer capabilities. 2015-06-08 18:51:30 +09:00
Matteo Bruni 614e52e897 wined3d: Don't use the builtin FFP uniforms for fog parameters. 2015-06-05 16:53:20 +09:00
Matteo Bruni 92fbe333d0 wined3d: Handle point sprites with PS 3.0. 2015-06-05 16:52:29 +09:00
Matteo Bruni c186939f32 wined3d: Clamp per-vertex point size in vertex shaders. 2015-06-03 19:52:22 +09:00
Matteo Bruni e8cb3bdba5 wined3d: Always enable GL_PROGRAM_POINT_SIZE in the GLSL backend.
Core contexts don't support clamping the point size to GL_POINT_SIZE_MIN
/ GL_POINT_SIZE_MAX.  Incidentally this mostly fixes per-vertex point
sizes for vertex shader version 1 and 2.
2015-06-03 19:52:14 +09:00
Matteo Bruni 90af08c3b1 wined3d: Avoid the builtin uniforms for point size when using the fixed function vertex pipeline. 2015-05-29 16:44:24 +09:00
Matteo Bruni 409cda0ac2 wined3d: Dirtify vertex shader on transformed <-> untransformed transitions. 2015-05-20 17:29:05 +09:00
Matteo Bruni 2bab1f7250 wined3d: Check all the ffp_material fields.
The application can override each material parameter with one of the two
FFP vertex color attributes. The 'ambient' struct field in the GLSL shader
can thus happen to be unused and the GL driver may optimize it away.
2015-05-05 18:51:00 +09:00
Matteo Bruni 0c05f9f8fd wined3d: Rename *emission* as *emissive*.
Emission is the OpenGL name, emissive the D3D one. Prefer the latter.
2015-05-05 18:50:56 +09:00
Francois Gouget f129e2fbb1 wined3d: Add a trailing '\n' to a generated shader line. 2015-05-04 15:06:47 +09:00
Matteo Bruni 213f7d9f45 wined3d: Implement WINED3D_LIGHT_PARALLELPOINT support in the GLSL ffp. 2015-05-01 15:45:00 +09:00
Matteo Bruni 4388fb41e7 wined3d: Implement legacy light attenuation behavior in the GLSL vertex ffp. 2015-05-01 15:44:49 +09:00
Matteo Bruni f7e0927622 wined3d: Don't use the same va_list multiple times in shader_vaddline(). 2015-04-30 20:07:17 +09:00
Matteo Bruni ca46914d07 wined3d: Use string_buffer_sprintf() in shader_glsl_generate_ffp_fragment_shader(). 2015-04-29 17:02:30 +09:00
Matteo Bruni 12e59c5278 wined3d: Use string_buffer_sprintf() in handle_ps3_input(). 2015-04-29 17:02:27 +09:00
Henri Verbeet da24b51139 wined3d: Don't try to apply format fixups for SM4+ shaders. 2015-04-29 12:24:36 +09:00
Matteo Bruni 28343db208 wined3d: Don't use the builtin FFP uniforms for the lights.
While at it, use D3D-like uniforms for the light parameters and
(consequently) implement range and proper D3D spotlights support.
2015-04-28 20:02:23 +09:00
Matteo Bruni e226e7593a wined3d: Use struct wined3d_vec4 to store the light position and direction. 2015-04-28 20:02:21 +09:00
Matteo Bruni 540130bfa9 wined3d: Store the directional light direction in the lightDirn field.
It's only an implementation detail that the direction needs to be passed
to the fixed function GL pipeline as GL_POSITION.
2015-04-28 20:02:18 +09:00
Matteo Bruni 978fe23218 wined3d: Don't use the builtin FFP uniforms for the material. 2015-04-27 15:07:11 +09:00
Matteo Bruni 6984ca7f46 wined3d: Don't use the builtin FFP uniforms for texture transformation matrices. 2015-04-27 15:07:06 +09:00
Matteo Bruni 84ca0203bf wined3d: Introduce a scratch string buffers framework. 2015-04-27 15:07:03 +09:00
Matteo Bruni 64463b81df wined3d: Rename struct wined3d_shader_buffer to wined3d_string_buffer.
Also rename the shader_buffer_(clear|init|free) functions.
2015-04-27 15:06:55 +09:00
Matteo Bruni d6db6c7295 wined3d: Fix specular lighting for non-local viewer.
The viewer is in the (0.0, 0.0, -1.0) direction in the D3D coordinate
system.
2015-04-24 19:08:01 +09:00
Matteo Bruni b963c73abb wined3d: Introduce D3D7+ normal matrix computation. 2015-04-24 19:07:52 +09:00
Henri Verbeet cfd280fd66 wined3d: Get rid of the tracing code in shader_vaddline(). 2015-04-24 14:29:39 +09:00
Francois Gouget 6f6dfe91d6 wined3d: Make glsl_vertex_pipe_view() static. 2015-04-23 20:43:19 +09:00
Henri Verbeet 6e4ad78ff4 wined3d: Slightly simplify get_info_log_line(). 2015-04-21 23:44:59 +09:00
Henri Verbeet de1450788b wined3d: Completely initialize "correction_params" in shader_glsl_load_constants() (Valgrind).
Leaving the last two elements uninitialized is mostly harmless since the
shader doesn't actually use them, but the driver might try to do some kind of
analysis on them.
2015-04-21 22:22:00 +09:00
Henri Verbeet aad0ab8101 wined3d: Properly handle WINED3DSIH_DP2 in the GLSL shader backend. 2015-04-15 22:21:59 +09:00
Stefan Dösinger 382fa588a9 wined3d: Handle color key dirtification in wined3d_cs_exec_set_texture. 2015-04-15 22:21:57 +09:00
Joachim Priesner 8fff427bc0 wined3d: Load ModelView matrix for glLightfv calls.
Analogous to the light() function in state.c, the correct ModelView
matrix has to be loaded when glLightfv is called.
2015-04-13 16:41:48 +09:00
Stefan Dösinger c5c7137212 wined3d: Simplify alpha test and color keying in GLSL. 2015-04-10 21:44:13 +09:00
Stefan Dösinger 5c7707dc77 wined3d: Move alpha test states to the fragment pipeline.
This will allow some color keying cleanups. For Core Contexts we'll have
to emulate alpha testing in shaders anyway.
2015-04-10 21:44:01 +09:00