Shader Writing and Integration
- The mi_compute_irradiance shader interface function, if called to
evaluate irradiance from final
gathering, will return the average of all alphas from finalgather
rays. It was previously undefined. This allows a simple form of
ambient occlusion mapping.
- A new geometry shader interface
function mi_api_parameter_default allows
supplying default values for declared numerical shader
parameters.
- The mi_X_from_Y shader
interface functions now work when called from displacement
shaders.
- The
[0] coordinate for hair was
changed to a range of (0, 1) from the left to the right edge of the
hair, as seen from the camera. Previously it was defined in the
range (1, 0, 1) with 0 at the center.
- Added a mi_trace_continue shader interface function that
continues the current ray with the same state and type, as if the
intersection had not happened.
- Added a mi_api_touch geometry shader interface function to mark
objects for re-evaluation.
- In rasterizer (formerly
called Rapid Motion) mode,
environment shaders now receive
the raster_x and raster_y state variables.
- The miQ_GEO_LABEL mode of the mi_query shader interface function
may now be used from displacement
shaders.
- Multiple finalgather file
names can be attached to options with mi_api_taglist_reset.
- The callback installed by the mi_disp_stream_cb_begin
integration function receives a pointer to a tag list, not a single
tag. This allows access to all frame buffers, not just the main
color frame buffer. Also, the tags pointed to are the full frame
buffers, not the small image rectangles, so it is necessary to use
the xl and yl arguments to offset into them. (This
will change again in 3.4.)
- The 128-byte stub files now specify version number 3.3, and add
another port number at the end that can be used for bidirectional
connections that allow a realtime viewer to request arbitrary frame
buffers, in their native format without interleaved 8-bit RGBA
conversion. The imf_disp viewer does not support this new
mode.
- The second argument of the mi_lib_registry_lookup
integration interface function now expects a miRL_* enum
code instead of a miBoolean. The enum codes were chosen to be
backwards compatible without recompilation.
- The mi_raylib_init integration interface function now
returns a boolean that indicates an initialization failure if
miFALSE. Common reason for such a failure are failures to
start threads, or a failure to create local loopback network
connections because an overzealous Windows firewall prohibits
it.
- First derivatives on subdivision surface, free-form surface,
and polygonal (if available) geometry are now made available to
displacement shaders. Also, the result pointer passed to
displacement shaders when displacing subdivision surfaces now
points to cleared memory (this was already the case for other
geometry types).
- At startup, mental ray will record the thread priority and use
it for all render threads it creates later. This allows the
application that mental ray is embedded in to reduce rendering
priority to keep the GUI responsive.
- The .rayhosts file lists the names of slave hosts to attach to
for network rendering. It is now possible to append
-threads n to each line to control the number of
threads on that host. This used to work in version 2.x but not
3.x.
- Translators may specify triangle meshes as triangle lists, which directly
correspond with renderable data structures without requiring
tessellation. (The downside is that they change between major
mental ray versions.)
Copyright © 1986-2006 by mental images GmbH