mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-21 20:21:09 +00:00
Merge vk_point_particles with vk_particle_square to vk_custom_particles
This commit is contained in:
parent
7be20ac1cd
commit
832d9666d4
3 changed files with 12 additions and 16 deletions
|
@ -332,7 +332,7 @@ it's `+set busywait 0` (setting the `busywait` cvar) and `-portable`
|
|||
* **vk_validation**: Toggle validation layers:
|
||||
* `0` - disabled (default in Release)
|
||||
* `1` - only errors and warnings
|
||||
* `2` - full validation (default in Debug)
|
||||
* `2` - best-practices validation
|
||||
|
||||
* **vk_strings**: Print some basic Vulkan/GPU information.
|
||||
|
||||
|
@ -367,11 +367,10 @@ it's `+set busywait 0` (setting the `busywait` cvar) and `-portable`
|
|||
start (default: `0`). Don't use this, it's there just for the sake of
|
||||
having a `gl_finish` equivalent!
|
||||
|
||||
* **vk_particle_square**: If set to `1` particles are rendered as
|
||||
squares.
|
||||
|
||||
* **vk_point_particles**: Toggle between using POINT_LIST and textured
|
||||
triangles for particle rendering. (default: `1`)
|
||||
* **vk_custom_particles**: Toggle particles type:
|
||||
* `0` - textured triangles for particle rendering
|
||||
* `1` - between using POINT_LIST (default)
|
||||
* `2` - textured square for particle rendering
|
||||
|
||||
* **vk_particle_size**: Rendered particle size. (default: `40`)
|
||||
|
||||
|
|
|
@ -156,8 +156,7 @@ extern cvar_t *vk_particle_att_b;
|
|||
extern cvar_t *vk_particle_att_c;
|
||||
extern cvar_t *vk_particle_min_size;
|
||||
extern cvar_t *vk_particle_max_size;
|
||||
extern cvar_t *vk_point_particles;
|
||||
extern cvar_t *vk_particle_square;
|
||||
extern cvar_t *vk_custom_particles;
|
||||
extern cvar_t *vk_dynamic;
|
||||
extern cvar_t *vk_msaa;
|
||||
extern cvar_t *vk_showtris;
|
||||
|
|
|
@ -115,8 +115,7 @@ cvar_t *vk_particle_att_b;
|
|||
cvar_t *vk_particle_att_c;
|
||||
cvar_t *vk_particle_min_size;
|
||||
cvar_t *vk_particle_max_size;
|
||||
cvar_t *vk_point_particles;
|
||||
cvar_t *vk_particle_square;
|
||||
cvar_t *vk_custom_particles;
|
||||
cvar_t *vk_postprocess;
|
||||
cvar_t *vk_dynamic;
|
||||
cvar_t *vk_msaa;
|
||||
|
@ -406,7 +405,7 @@ void R_DrawEntitiesOnList (void)
|
|||
** Vk_DrawParticles
|
||||
**
|
||||
*/
|
||||
void Vk_DrawParticles(int num_particles, const particle_t particles[], const unsigned colortable[768], int particle_square)
|
||||
void Vk_DrawParticles(int num_particles, const particle_t particles[], const unsigned colortable[768])
|
||||
{
|
||||
typedef struct {
|
||||
float x,y,z,r,g,b,a,u,v;
|
||||
|
@ -498,7 +497,7 @@ void Vk_DrawParticles(int num_particles, const particle_t particles[], const uns
|
|||
vkCmdPushConstants(vk_activeCmdbuffer, vk_drawTexQuadPipeline.layout,
|
||||
VK_SHADER_STAGE_FRAGMENT_BIT, 17 * sizeof(float), sizeof(gamma), &gamma);
|
||||
|
||||
if (particle_square)
|
||||
if (vk_custom_particles->value == 2)
|
||||
{
|
||||
vkCmdBindDescriptorSets(vk_activeCmdbuffer, VK_PIPELINE_BIND_POINT_GRAPHICS,
|
||||
vk_drawParticlesPipeline.layout, 0, 1,
|
||||
|
@ -522,7 +521,7 @@ R_DrawParticles
|
|||
*/
|
||||
void R_DrawParticles (void)
|
||||
{
|
||||
if (vk_point_particles->value)
|
||||
if (vk_custom_particles->value == 1)
|
||||
{
|
||||
int i;
|
||||
unsigned char color[4];
|
||||
|
@ -588,7 +587,7 @@ void R_DrawParticles (void)
|
|||
}
|
||||
else
|
||||
{
|
||||
Vk_DrawParticles(r_newrefdef.num_particles, r_newrefdef.particles, d_8to24table, vk_particle_square->value);
|
||||
Vk_DrawParticles(r_newrefdef.num_particles, r_newrefdef.particles, d_8to24table);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1158,8 +1157,7 @@ R_Register( void )
|
|||
vk_particle_att_c = ri.Cvar_Get("vk_particle_att_c", "0.01", CVAR_ARCHIVE);
|
||||
vk_particle_min_size = ri.Cvar_Get("vk_particle_min_size", "2", CVAR_ARCHIVE);
|
||||
vk_particle_max_size = ri.Cvar_Get("vk_particle_max_size", "40", CVAR_ARCHIVE);
|
||||
vk_point_particles = ri.Cvar_Get("vk_point_particles", "1", CVAR_ARCHIVE);
|
||||
vk_particle_square = ri.Cvar_Get("vk_particle_square", "1", CVAR_ARCHIVE);
|
||||
vk_custom_particles = ri.Cvar_Get("vk_custom_particles", "1", CVAR_ARCHIVE);
|
||||
vk_postprocess = ri.Cvar_Get("vk_postprocess", "1", CVAR_ARCHIVE);
|
||||
vk_dynamic = ri.Cvar_Get("vk_dynamic", "1", 0);
|
||||
vk_msaa = ri.Cvar_Get("vk_msaa", "0", CVAR_ARCHIVE);
|
||||
|
|
Loading…
Reference in a new issue