VOGONS


Reply 240 of 1623, by RaVeN-05

User metadata
Rank Oldbie
Rank
Oldbie

=0 yes, same behavior at my PC, alttabbing also makes Egyptian Golem entirely red

https://www.youtube.com/user/whitemagicraven
https://go.twitch.tv/whitemagicraventv

Reply 241 of 1623, by sharangad

User metadata
Rank Oldbie
Rank
Oldbie

Anyone who wants a shot at decoding Quake antialiasing here you go:

There're 8 numbers. The six in the middle are coordinates and are well known. The leftmost number and the right most number are the magical items:
<unknown 1>,<x1 *65536>, <y1 * 65536>, <z1 * 65536>, <x2 * 65536>, <y2 * 65536>, <z2 * 65536>, <unknown 2>

Here's the file for vHexen 2:
https://1drv.ms/u/s!As-dKk-N73dSllw6v70-Q92Dau7V?e=LcX0bk
MD5: 7394a9887e83168376f0f4c3d4abf976

And for Quake 2: Level 1 (easy) intro frame (static)
https://1drv.ms/u/s!As-dKk-N73dSll2RIdqPdOBYIzWm?e=TtZ4Bc
MD5: a94bf342e7e8d4afa13f049fc331d8a4

You should be able to import into a spreadsheet as a csv file. These aren't for a static frame, buffer swaps (display updates) are indicated after a sequence.

The magic is in the first and last number. I've tried treating the leftmost numbers as 2 RGB565 numbers (doesn't work) as a floating point blending factor(convert directly to float, divide by 2^32, etc ...).

Developer of RReady - Rendition Verité Wrapper.
https://www.youtube.com/@sharangadayananda

Reply 242 of 1623, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t

I was going through some older posts of @RaVeN-5 and I noticed there were certain things he or @sharangad was unable to emulate on a modern machine. @RaVeN-05 insisted that it could be a modern machine incompatibility, but I rather disagree do have a direct conclusion like that quickly. It could be some other threading problem, or a Heap mechanism issue, so I rather suggest to records such unemulated cases for later.

previously known as Discrete_BOB_058

Reply 243 of 1623, by RaVeN-05

User metadata
Rank Oldbie
Rank
Oldbie

i think to post nothing, but ok i will accept i am fool ) i am have no knowledge in verite.

please make test version of RReady ,where all these lines from x1y1z1 to x2y2z2, will be drawn as lines blended with background image , by blending various simple colors 50%/50% to background, every new call will use next color, red, green,blue,yellow,cyan,magenta,white,black. and in cfg ability to turn off/on "z obscurity test" to prevent obscured edges(lines) to be drawn.

I guess it right way? The QAAZEDGE operates in 2d as post-processing and Z here is for scissor , to determine it should be applied or not, obscured / overlapped by other polygons that closer to camera, to avoid artifacts?
and this func calls so many times than, and not always applied, only applies at visible edges,and discarded if overlapped.

From reading what available currently i spot "For testing purposes, colored lines may be drawn instead of anti-aliased edges by setting
SrcFunc to V_SRCFUNC_NOTEXTURE. The FGColor state will then determine the color of the
line drawn." in VL_AAEdge , also have idea to force this V_SRCFUNC_NOTEXTURE value for everything too see if QAAZEDGE is based on VL_AAEdge or if its completely own function. it might be QAAZEDGE do some calculations /preparations than call VL_AAEdge . (As second approach not the same as request for test version)

maybe its possible to make app that will do that V_FIFO_QAAZEDGE on real hardware and it will intercept results? by make some kind of single triangle and controlling those 2 unknown items by entering numbers or by forward/rewind by keyboard. i know may have long tinkering, or may corrupt or hang , the initial values of these 2 should be in between we have now. Or proxy dll for win98 which intercept qaazedge and corrupt value1 or value2 /or both by user cfg file too see what happens )) maybe value2 is not so valuable here.

how far/close this qaazedge can be from known aazedge , aaedge ? i think presence of "Q" here is exclusivity for Quake, maybe id Software and Rendition contacted to each other and they implemented this by request. (as id Software done to OpenGL too)

what i can find so far from various docs and literals from binary files, i think you already know, just to summarize and catch thinking direction.

"#define V_FIFO_QAAZEDGE 43" //(almost all <unknown 2> values is 43, some of them 0 and 4657 not a big variety here.) //vh2 even don't have 0, in these logs.
too many strings in log with same values, redundant lines. its because "These aren't for a static frame" right?

from v2200spec.pdf

file.php?mode=view&id=177418

from pguide.doc

Collect things into locked memory and use V_AddToDMAList()
It is sometimes useful to collect commands into locked memory that is not part of a
command buffer, and point the command buffer at it when necessary through the
funcion V_AddToDMAList(). For example, in VHexen2 and Quake 2, when
antialiasing is enabled, the VL_AAEdge() commands are not placed on the command
buffer when the edges are calculated since they need to be run at the end of the frame.
Instead they are stored in locked memory as the polygons are being drawn. When the
entire frame is done and ready to be antialiased, the game simply calls
V_AddToDMAList(). This technique can both save the extra memory copy from an
edge cache into the command buffer, as well as saving cycles in the polygon loops by
storing the vertices to the edge list at the same time as to the command buffer.
This technique might apply any time you have a large group of “pre-cooked”
commands or data, such as state sets, VL_MemWriteSprite() calls, and so on.

from SDK

QAAZEDGE appears only in some *.uc files and on RRedline\Include\rlfifo.h
in uc files "vu_fifo_qaazedge"
"#define V_FIFO_QAAZEDGE 43" //(almost all <unknown 2> values is 43, some of them 0 and 4657 not a big variety here.) //vh2 even don't have 0, in these logs.

AAZEDGE appears
in uc files "vu_aazedge"
RRedline\Examples\Utils\com.c and RRedline\Examples\Utils\com.h
"
void draw_aazedge(v_handle verite, v_cmdbuffer *cmdbuffer,
v_surface *display, float x0, float y0, float z0,
float x1, float y1, float z1)
{
v_u32 v0[4], v1[4];

if (draw_flag == 1)
{
v0[0] = 0;
v0[1] = FLTOIFIX(x0);
v0[2] = FLTOIFIX(y0);
v0[3] = FLTOIFIX(z0);
v1[0] = 0;
v1[1] = FLTOIFIX(x1);
v1[2] = FLTOIFIX(y1);
v1[3] = FLTOIFIX(z1);
}
else
{
v0[0] = 0;
v0[1] = FLTOIFIX( ((x0+1.0)/2.0) * display->width );
v0[2] = FLTOIFIX( ((1.0-y0)/2.0) * display->height);
v0[3] = FLTOIFIX(z0);
v0[0] = 0;
v1[1] = FLTOIFIX( ((x1+1.0)/2.0) * display->width );
v1[2] = FLTOIFIX( ((1.0-y1)/2.0) * display->height);
v1[3] = FLTOIFIX(z1);
}

VL_AAEdge(cmdbuffer, V_FIFO_KXYZ, v0, v1);
V_IssueCmdBuffer(verite, *cmdbuffer);
}

"

"
void draw_aazedge(v_handle verite, v_cmdbuffer *cmdbuffer,
v_surface *display, float x0, float y0, float z0,
float x1, float y1, float z1);
"

AAEDGE appears
in uc files as
"
aaedge_first_vertex
aaedge_second_vertex
aaedge_return
aaedge_skip_table_read
vu_aaedge_table
vu_aaedge
vu_fifo_aaedge
"
RRedline\Include\rlfifo.h
"
#define V_FIFO_AAEDGE 25
"
"
typedef struct {
v_u32 cmd; /* V_FIFO_AAEDGE */
/* vertex 0 data */
/* vertex 1 data */
} v_fifo_aaedge;
"

com.h file
"
void draw_aaedge(v_handle verite, v_cmdbuffer *cmdbuffer,
v_surface *display, float x0, float y0, float x1,
float y1);
"

com.c file
"
void draw_aaedge(v_handle verite, v_cmdbuffer *cmdbuffer,
v_surface *display, float x0, float y0,
float x1, float y1)
{
v_u32 v0[2], v1[2];

if (draw_flag == 1)
{
v0[0] = FLTOIFIX(x0);
v0[1] = FLTOIFIX(y0);
v1[0] = FLTOIFIX(x1);
v1[1] = FLTOIFIX(y1);
}
else
{
v0[0] = FLTOIFIX( ((x0+1.0)/2.0) * display->width );
v0[1] = FLTOIFIX( ((1.0-y0)/2.0) * display->height);
v1[0] = FLTOIFIX( ((x1+1.0)/2.0) * display->width );
v1[1] = FLTOIFIX( ((1.0-y1)/2.0) * display->height);
}

VL_AAEdge(cmdbuffer, V_FIFO_XY, v0, v1);
V_IssueCmdBuffer(verite, *cmdbuffer);
}
"
ncube.c has some

from ref.doc
"
VL_AAEdge
NAME
VL_AAEdge – Draws an anti-aliased edge.
C SPECIFICATION
vl_error VL_AAEdge(v_cmdbuffer *cmdbuffer, v_u32 v_type, v_u32 *v1, v_u32 *v2)
PARAMETERS
cmdbuffer Pointer to active command buffer handle
v_type Vertex type
v1 Pointer to vertex 1 data
v2 Pointer to vertex 2 data
DESCRIPTION
Anti-aliases a polygon edge by filtering it against the background. The edge is specified by two
vertices of the specified type. Normally, only the X, Y, and Z vertex attributes are relevant to antialiased edges. The Z attribute is optional; it may be used to skip edge pixels which the Z buffer
indicates are obscured. The edge coordinates should exactly match the coordinates of the
polygon to be anti-aliased.
To draw each anti-aliased edge pixel, the bilinear filter is applied to four pixels in the vicinity using
the precise subpixel position of the underlying edge.

For anti-aliasing to operate properly, the destination raster must also be set up as the source
raster. Bilinear filtering must be turned on and source color padding must be turned off. All other
drawing effects must be turned off. The exact pixel engine state that must be set for anti-aliasing
is as follows:
Pixel Engine state Value
SrcBase same as DstBase
SrcStride same as DstStride
SrcFmt V_PIXFMT_DSTFMT, or same as DstFmt
UMask destination width  1
VMask destination height  1
UClamp V_UCLAMP_ENABLE
VClamp V_VCLAMP_ENABLE
SrcFunc V_SRCFUNC_REPLACE
SrcFilter V_SRCFILTER_BILINEAR
SrcColorNoPad V_SRCCOLORPAD_DISABLE
ChromaKey V_CHROMAKEY_DISABLE
ALUMode V_ALUMODE_SRC
YUV2RGB V_YUV2RGB_DISABLE
BlendEnable V_BLEND_DISABLE
TranspReject V_TRANSPREJECT_DISABLE
FogEnable V_FOG_DISABLE
PatEnable V_PAT_DISABLE
For testing purposes, colored lines may be drawn instead of anti-aliased edges by setting
SrcFunc to V_SRCFUNC_NOTEXTURE. The FGColor state will then determine the color of the
line drawn.
COMMAND BLOCK
msb
31
lsb
0
Vertex Type V_FIFO_AAEDGE
Vertex 1 Data
...
Vertex 2 Data
...
NOTES
Edge anti-aliasing is designed to be a post-processing step which allows scenes to be correctly
anti-aliased without storing coverage information for every pixel. Only the pixels along polygon
edges are redrawn, so edge anti-aliasing typically takes very little additional time relative to the
time it takes to render a scene.
Because the edge’s pixels must be filtered with the adjacent pixels, a particular polygon edge
should not be anti-aliased until all background or adjoining polygons have been drawn. Typically,
an application builds a list of edges while drawing one connected group of polygons (one object
for example). After all of the polygons in the group are drawn, the polygon edges are anti-aliased
using the stored list of edges.
When two polygons share the same edge, make sure that the edge is not anti-aliased twice; this
will cause artifacts as well as hurt performance. The most important edges to anti-alias are the
edges around the silhouette of an object. It is also desirable to anti-alias the edges between
adjoining polygons when there is a sharp change in shading or texture between them.
Avoid anti-aliasing edges which have been covered up by closer objects, as subtle artifacts may
“show through” the closer object.
SEE ALSO
Appendix A – Vertex Types
VL_AALine
RETURNS
vl_error VL_SUCCESS On success
Error handler:
vl_routine VL_R_AAEdge
vl_error VL_PARAM_ERROR
VL_ADDTOCMDLIST_FAILED

"

Attachments

  • v2200spec.png
    Filename
    v2200spec.png
    File size
    55.98 KiB
    Views
    916 views
    File license
    Public domain

https://www.youtube.com/user/whitemagicraven
https://go.twitch.tv/whitemagicraventv

Reply 244 of 1623, by sharangad

User metadata
Rank Oldbie
Rank
Oldbie

I'm working on AA right now.

I think my initial guess that the first number is two blending factors (upper two bytes and lower) each when divided by 65536.0 gives a blending factor.

Still trying to get it to work.

Developer of RReady - Rendition Verité Wrapper.
https://www.youtube.com/@sharangadayananda

Reply 245 of 1623, by sharangad

User metadata
Rank Oldbie
Rank
Oldbie

#define V_FIFO_QAAZEDGE 43

Is how it shows in the command buffer. Didn't realise it was 43. The command stream has to begin with V_FIFO_QAAZEDGE . Maybe it ends with it as well.

[EDIT] Well spotted. The last V_FIFO_QAAZEDGE ends with 0x1231 and not 0x2B (43). So that's definitely a command terminator.

Developer of RReady - Rendition Verité Wrapper.
https://www.youtube.com/@sharangadayananda

Reply 246 of 1623, by sharangad

User metadata
Rank Oldbie
Rank
Oldbie

It's not as simple as drawing a line and blending it. This is a post-processing effect. Two adjacent parts of the screen (along the line) have to be blended.

Developer of RReady - Rendition Verité Wrapper.
https://www.youtube.com/@sharangadayananda

Reply 247 of 1623, by RaVeN-05

User metadata
Rank Oldbie
Rank
Oldbie

maybe , your initial guess is gives from quake2 (first two lines)
4294721348 = 0.24713134765625 and 0.99993896484375
407724 = 0.22137451171875 and 0.000091552734375

but sum of those two bigger than 1 or even not reach 1

maybe there is 3 blending colors? color of current position, color of x1y1z1 , color of x2y2z2 , and these 3 must be magically blended somehow?
i guess current pixel is matter we should not loose it completely and it just need to be modified . only guessing don't threat it seriously

https://www.youtube.com/user/whitemagicraven
https://go.twitch.tv/whitemagicraventv

Reply 248 of 1623, by sharangad

User metadata
Rank Oldbie
Rank
Oldbie

It's actually 2 different blending factors, the upper 2 bytes and lower 2 bytes represent 2 different blending factors at the 2 ends of the line or 2 edges (I've visually verified that it's 2 different blending factors that vary felt light to dark) . I have something that works. But it's blending the wrong pixels. It looks to me from videos the blended lines are blended horizontally or vertically and not across the width or length of the line. The colour variation on the edges of the aa lines are always horizontal or vertical depending on the slope of the line.

I'm trying to replicate that.

What I have now doesn't work underwater.

Last edited by sharangad on 2023-11-01, 07:44. Edited 1 time in total.

Developer of RReady - Rendition Verité Wrapper.
https://www.youtube.com/@sharangadayananda

Reply 249 of 1623, by sharangad

User metadata
Rank Oldbie
Rank
Oldbie

Oh and I have some ideas about why the golems aren't changing colour.

Developer of RReady - Rendition Verité Wrapper.
https://www.youtube.com/@sharangadayananda

Reply 250 of 1623, by RaVeN-05

User metadata
Rank Oldbie
Rank
Oldbie

oh attachments broken on vogons

I have spot that there is artifacts on Real HW when AA used, not a perfect, these artifacts may bare laid that your theory appears to be right about gradients are drawn only vertically or horizontally.
Happens when textured too. Those broken gradient appears vertically and horizontally, gradients start to broke when i move mouse a little bit so adjacent line of two polygons go out of visible area on screen.

Look at right top corner where orange and dark gray polys connected , zoom in to see it better.

This pair of screenshots show aa off/on , when on there is broke.
quake13.pngquake14.png

This pair show a good right way. That should be all time.
quake15.pngquake16.png

in more zoomed place
quakeaa4.pngquakeaa3.png
Animated
qezgif-2-13c4130111.gif

https://www.youtube.com/user/whitemagicraven
https://go.twitch.tv/whitemagicraventv

Reply 252 of 1623, by RaVeN-05

User metadata
Rank Oldbie
Rank
Oldbie

old video https://www.youtube.com/watch?v=krY2t9Xz1Jw&f … WhiteMagicRaven

new video https://youtu.be/0qxXwWTdm3c
download videos (better quality) https://fex.net/s/tyldbl3 (link lives 7days)

when i underwater and quits from console to desktop still remains with tint i have underwater , verite applies this 256 tint to 16 bit mode globally everywhere . =0

https://www.youtube.com/user/whitemagicraven
https://go.twitch.tv/whitemagicraventv

Reply 253 of 1623, by sharangad

User metadata
Rank Oldbie
Rank
Oldbie

My current attempt:
https://1drv.ms/u/s!As-dKk-N73dSll4twvxTmGq8BHJ4?e=TcWWlY
MD5: f1c25709b13cc33bca2d35a75cce94d6

[EDIT] At 800x600@75Hz

Developer of RReady - Rendition Verité Wrapper.
https://www.youtube.com/@sharangadayananda

Reply 255 of 1623, by RaVeN-05

User metadata
Rank Oldbie
Rank
Oldbie

i think no, never saw it. will check maybe will find something useful, at least i think you can temporarely disable 8bit palette change on 16 bit mode, you introduced before.

r_nomurk 0/1 is equivalent to cl_blend 0/1 in Quake2, 0 turn off tint

Good progress.

you can also do, in console:
bind q "v1k_antialias 7;echo AA On"
bind e "v1k_antialias 0;echo AA Off"
to quickly test by pressing on keyboard Q/E key to turn on/off AA

P.S. Quake and HeXen II have common

r_drawflat (T)
Syntax: r_drawflat <0/1>
Default: 0
Toggles the drawing of texture maps. (0=use texture maps)
r_drawflat - Default 0, setting this to 1 will replace all textures with flat, unshaded, solid colors on every surface. Useful for analyzing geometry.

v_cshift (V)
Syntax: v_cshift <red> <green> <blue> <intensity>
This adjusts all of the colors currently being displayed. Used when you are underwater, hit, or have the Ring of Shadows. Values range from 0-256 for all four values.

r_ambient (V)
Syntax: r_ambient <value>
Default: 0
Sets how bright the rooms are by default. This applies regardless of separate light source present in a room.

r_fullbright (T)
Syntax: r_fullbright <0/1>
Default: 0
See also: gamma

https://www.youtube.com/user/whitemagicraven
https://go.twitch.tv/whitemagicraventv

Reply 256 of 1623, by sharangad

User metadata
Rank Oldbie
Rank
Oldbie

That's excellent.

cl_blend doesn't current work with RReady. The rest I haven't tried testing ... yet.

Developer of RReady - Rendition Verité Wrapper.
https://www.youtube.com/@sharangadayananda

Reply 257 of 1623, by RaVeN-05

User metadata
Rank Oldbie
Rank
Oldbie

what =0, how ))) i tried "cl_blend 0" with rready and it works , i have no underwater tint anymore.

and
r_waterwarp 0/1 in quake/hexen2 similar as in quake2 v1k_waterwarp
vid_mode similar to v1k_mode

https://www.youtube.com/user/whitemagicraven
https://go.twitch.tv/whitemagicraventv

Reply 258 of 1623, by RaVeN-05

User metadata
Rank Oldbie
Rank
Oldbie

i found something very unusual in vhexen2.
you can set any resolution in game by:
vid_config_x 1024
vid_config_y 768
IMPORTANT to be on map
then go to main menu and choose this resolution in video options, it will be listed as windowed, unfortunately even RReady can't force fullscreen in this case.
The bigger resolution you use , the more glitches will appear.

And it works some how, if you disconnect from map or change level it may crash.

1280x720 seems not crashes

Last edited by RaVeN-05 on 2023-11-01, 21:24. Edited 1 time in total.

https://www.youtube.com/user/whitemagicraven
https://go.twitch.tv/whitemagicraventv

Reply 259 of 1623, by sharangad

User metadata
Rank Oldbie
Rank
Oldbie

That's an awesome find!

You can bung those two lines into an autoexec.cfg and select it on the map. I was able to add 1280x1024 and 1368x768 (16:9).

There might be a way to force fullscreen. Another item to add to my list.

Developer of RReady - Rendition Verité Wrapper.
https://www.youtube.com/@sharangadayananda