Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 51 additions & 1 deletion Core/Libraries/Source/WWVegas/WW3D2/pointgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,13 @@ void PointGroupClass::Update_Arrays(

case TRIS_SIZE_NOORIENT:
{
if (!point_size)
{
vnum = 0;
pnum = 0;
return;
}

// Scale vertex offsets and add them to point locations to get vertex locations
for (i = 0; i < active_points; i++) {
vertex_loc[vert + 0] = point_loc[i] +
Expand All @@ -1121,6 +1128,13 @@ void PointGroupClass::Update_Arrays(

case TRIS_NOSIZE_ORIENT:
{
if (!point_orientation)
{
vnum = 0;
pnum = 0;
return;
}

// Scale vertex offsets and add them to point locations to get vertex locations
for (i = 0; i < active_points; i++) {
vertex_loc[vert + 0] = point_loc[i] +
Expand All @@ -1136,6 +1150,13 @@ void PointGroupClass::Update_Arrays(

case TRIS_SIZE_ORIENT:
{
if (!point_size || !point_orientation)
{
vnum = 0;
pnum = 0;
return;
}

// Scale vertex offsets and add them to point locations to get vertex locations
for (i = 0; i < active_points; i++) {
vertex_loc[vert + 0] = point_loc[i] +
Expand Down Expand Up @@ -1171,6 +1192,13 @@ void PointGroupClass::Update_Arrays(

case QUADS_SIZE_NOORIENT:
{
if (!point_size)
{
vnum = 0;
pnum = 0;
return;
}

// Scale vertex offsets and add them to point locations to get vertex locations
for (i = 0; i < active_points; i++) {
vertex_loc[vert + 0] = point_loc[i] +
Expand All @@ -1188,6 +1216,13 @@ void PointGroupClass::Update_Arrays(

case QUADS_NOSIZE_ORIENT:
{
if (!point_orientation)
{
vnum = 0;
pnum = 0;
return;
}

// Scale vertex offsets and add them to point locations to get vertex locations
for (i = 0; i < active_points; i++) {
vertex_loc[vert + 0] = point_loc[i] +
Expand All @@ -1205,6 +1240,13 @@ void PointGroupClass::Update_Arrays(

case QUADS_SIZE_ORIENT:
{
if (!point_size || !point_orientation)
{
vnum = 0;
pnum = 0;
return;
}

Matrix4x4 view;
Vector4 result;
if (!Billboard) {
Expand Down Expand Up @@ -1312,6 +1354,13 @@ void PointGroupClass::Update_Arrays(
case SCREEN_SIZE_NOORIENT:
case SCREEN_SIZE_ORIENT:
{
if (!point_size)
{
vnum = 0;
pnum = 0;
return;
}

// Offsets need to be scaled to the current screen resolution

// First find x and y scale factors (sizes in pixels need to be
Expand Down Expand Up @@ -1790,7 +1839,8 @@ void PointGroupClass::RenderVolumeParticle(RenderInfoClass &rinfo, unsigned int
// 3 times per particle when we can do it once
float recipDepth = 0.1f / (float)depth;

float shiftInc = ( t * *current_size * recipDepth );
const float pointSize = current_size ? *current_size : DefaultPointSize;
float shiftInc = t * pointSize * recipDepth;
Comment thread
greptile-apps[bot] marked this conversation as resolved.

Vector3 volumeLayerShift;
Vector3 cameraPosition = rinfo.Camera.Get_Position();
Expand Down
Loading