ResImageTexture::DynamicBuilder::MipmapSize BranchVisible being false for dynamically generated fragment Camera, Light and FogRotateViewUpdaterSceneUpdater::UpdateSkeletalModelRenderContext:SetModelMatrix into methods by class for optimization purposesFlags member of the resource classCalculatedTransformClear method to the SceneEnvironmentSettings classSwapSkeleton method to SkeletalModelTransformNode based on resources to configure transformsAnimGroup to OriginalValueGraphicsDevice::ReportIsNonuniformScalable attribute for skeletal models was removedTryPush~ related methods to SceneContextIMaterialActivator to RenderContext::ActivateContextDirectMaterialActivatorRenderContext::RenderMode where shader and scene environment settings are not configuredDraw command structure process during the initial render will take place during setupstd::memcpy to nn::nstd::MemCpynw::demo::ParticleEffectSetSamplerType to ResTextureSamplerCreate method of the inherited class of IMaterialActivatorGetSampler function to ResPixelBasedTextureMapperIsNonuniformScalable attribute for skeletal models was removedJShader sample shaderGraphicsDrawing class to use the CTR-SDK's GR libraryGraphicsDrawing classGraphicsDrawing::InitializeFont which takes a font binary as inputSetResourceBasedTransform to ConstraintDemoMultiAnimationDemoParticleMissileDemoParticleMultiModelDemo and the ParticleMultiEmitterDemo and combined them as the ParticleCombinationNodeDemoLocationFlag to Description for OffScreenBuffer was wrongTransformAnimEvaluator::TryBindMIN_FILTER was either LINEAR or NEARESTSignal class GetMemorySizeForFixedSizedSignal functionShaderParameter is now invariably set when ShaderProgram has been changedOnScreenBufferAnimFrameController::SetPlayPolicy(u8 loopMode)A bug was fixed where the translation component was not being processed correctly when a TransformNode::SetResourceScaledTransform specified a conversion matrix.
ResImageTexture::DynamicBuilder::MipmapSize The initial value of ResImageTexture::DynamicBuilder::MipmapSize was set to 0, but that is an invalid value, so it has been corrected.
BranchVisible being false for dynamically generated fragment Camera, Light and FogIn the DynamicBuilder class, dynamically generated Camera, Light and Fog were created with BranchVisible set to an initial value of false. That has been revised so now it is set to true.
RotateViewUpdaterWhen FLAG_INHERITING_ROTATE was enabled for RotateViewUpdater the camera matrix was not updated correctly. That problem was fixed.
When a material buffer was being used and a model instance was destroyed, the reference to the original lookup table was destroyed. That problem has been fixed. When a material buffer is being used, ResReferenceLookupTable is also copied and the only thing shared is the table being referenced.
Previously, there was a bug that caused incorrect rendering in certain circumstances. If you created your own geometry shader and set it for a material, and the color and texture coordinate settings of the next-rendered material (not using this geometry shader) were identical to the settings of the first material, it would not be rendered correctly.
Behavior has been revised so that now, when rendering switches from a geometry shader to a vertex shader, the ShaderProgram::ActivateShaderProgram function correctly re-sets the shader uniforms.
In previous versions of the library it was necessary to work around this bug by setting the hash values of the next-rendered material to 0, but with this fix that workaround is no longer necessary.
Skeleton updating is now skipped when SkeletalModel is configured to use fully baked skeletal animation. If you are developing with low-layer API functions, you must support this same specification in order to use fully baked skeletal animations.
There is now support for fully baked skeletal animation. By using the fully baked format, the process load for evaluating animation can be reduced compared to that for the frame format. However, there are major functional limitations, and the data size is larger.
For details, see the NW4C Function Reference > Graphics Documents > Animation > Advanced Features.
Model and SkeletalModel had been evaluated inside SetModelMatrix, but this has been separated into SetModelMatrixForModel and SetModelMatrixForSkeletalModel so the evaluations are no longer done internally. If NULL has been specified for SetModelMatrix, use ResetState(RESETSTATEMODE_MODEL_CACHE) to clear State.
A bug caused VertexColorScale to be set to 1 when Color was configured by SetAmbient of ResMaterialColor. Revisions were made so VertexColorScale no longer changes.
Added a function not implemented in previous versions to return the size of memory needed when creating certain scene nodes (e.g., Camera, Light and Fog) For details, see the documentation on the Builder class functions GetMemorySize and GetDeviceMemorySize.
Flags member of the the resource classAdded EnableFlags and DisableFlags. Uses these functions when you want to change only specified flags.
LocationFlag to Description of OffScreenBuffer.The method for setting locationFlag was wrong, so it was corrected.
CalculatedTransform for updating rotation matrix flags based on strict evaluation standardsFrom version 1.2.0, the UpdateRotateFlags function of CalculatedTransform has been changed to an optimized process which assumes 1 is the norm for rotation matrix parts. The functions UpdateRotateFlagsStrictly and UpdateFlagsStrictly have been added to perform the same process of the previous versions.
When an animation curve comprised of multiple segments was quantized, gaps would sometimes open up between the segments. When such an animation was played, sometimes access violations and other problems would arise. This was fixed by treating any gap between segments as the starting frame of the next segment.
You now must first call Clear if you plan to change SceneContext and perform ResolveReference again.
Added the method SwapSkeleton to SkeletalModel. Ownership of a Skeleton in the possession of a SkeletalModel can now be passed to a different SkeletalModel. If a skeleton is being shared, you first need to render the SkeletalModel that serves as the sharing source. If a sharing-source skeleton will not be rendered, use SwapSkeleton to pass ownership to the other SkeletonModel.
Added the functions SetResourceBasedTransform and SetResourceScaledTransform to TransformNode for setting resource-based transforms.
Added the function AnimGroup::Reset to reset all AnimGroup members by overwriting with OriginalValue.
All states held by GraphicsDevice now can be displayed.
By boosting processing efficiency, the Setup process on a resource is now conducted faster. To read how to speed up the creation of objects, see Optimization Tips.
Deprecated the attribute enabling skeletal models of non-uniform scale (IsNonuniformScalable). Below are the main reasons for deprecating this:
For skeletal models with 10 or more bones, performance can be improved by re-exporting the models. In the new exporter, this export option has been deprecated and exporting is done with this forcedly set to OFF.
In step with this, the following functions were deprecated:
RenderContext::SetMatrixPaletteCount, ShaderProgram::SetUseBoneNormalMatrix
These functions were deprecated because changes to the shader made the settings unnecessary. In addition, the default shader was revised.
The description of TransformAnimEvaluator::TryBind was wrong it was corrected.
Texture pattern animations cannot be shared using conventional methods, so a function was added for creating a clone sharing the curve and texture names. See anim::res::CloneTextureAnim.
ResProjectionRect::Set, ResOrthoProjectionUpdater::SetRect, ResPerspectiveProjectionUpdater::SetRect
The above functions invert top and bottom, so the following new functions have been added:
SetWithoutFlip, SetRectWithoutFlip → Height is (top - bottom) and matches the binary output.
SetWithYFlip, SetWithYFlip → Height is (bottom - top) and behaves same as current Set.
These changes and invert the handling of top and bottom by Camera::SetFrustum and Camera::SetOrtho . At the present time, Set and SetRect are scheduled to be deprecated and will be deleted in version 1.4.
For models that do not possess animation, a corresponding AnimationGroup is no longer created. You can expect this change to speed things up, since the models are skipped when traversing animation.
Added TryPush-related method to SceneContext to get additional success/fails without an assertion if there is not enough buffer or memory when adding SceneNode.
Added support for animation of Fog color.
Added a feature to ActivateContext for using IMaterialActivator created by the user when materials are enabled.
Added DirectMaterialActivator for enabling optional material settings using specified flags.
Added modes to RenderContext::RenderMode for not using shader and scene environment settings. The modes are RENDERMODE_IGNORE_SHADER and RENDERMODE_IGNORE_SCENEENVIRONMENT.
Up until now, when Setup was run on ResModel and ResShader, memory was obtained from nw::gfx::CommandCacheManager. That has been revised so that now memory is allocated from the Allocator specified in the argument of the Setup function. Memory is allocated the old way from nw::gfx::CommandCacheManager only when NULL is specified for Allocator.
Up until now, when Setup was run on ResModel and ResShader, the current command buffer set by gl was used as a temporary region. That has been revised so Setup no longer uses the current command buffer.
When texture and vertex data are to be transferred to VRAM, a send-to-VRAM command request is added to the current command list. With this revision, the Setup process and the Render process can operate in parallel in multiple threads without any problem if the transfer to VRAM does not take place, or if address resolution is completed before Setup by a transfer to VRAM ahead of time by the SetLocationAddress function or nw::gfx::TransferedVramAddressSetter.
Up until now, memory was allocated and commands were constructed after the model resource had been setup during the first session of rendering. That has been changed so the construction process is now done during Setup.
Depending on the alignment of copied memory, the processing by nn::nstd::MemCpy is faster than std::memcpy. For this reason, a number of parts that utilized std::memcpy have been changed to instead use nn::nstd::MemCpy.
Four-key animation can now be set for Scale, Scale (extended) , Color and Alpha of particles.
Added support for a feature that enables a particle child when generated to inherit the initial velocity from the parent.
Added a feature to nw::demo::ParticleEffect for managing particle shaders, and modified the particle demo to use this feature.
With Randomize specified direction set for particles, if (0, 0, ±1) was specified as the direction values and the process replayed, an assertion would occur. That problem was fixed.
When a step frame of 0.f was specified, particles would exhibit micromotion during playback using data for randomized particle position. That problem was fixed.
Added SetSamplerType to ResTextureSampler for changing the sampler type set in TextureMapper. If you have used SetMappingMethod of TextureCoordinator to change the mapping method, use SetSamplerType to match the change.
Up until now, 0 was written to [16:16] of register 0x25e when drawing. But that is no longer necessary because the configuration is done by nngxInitialize, so it has been deleted.
When Projection mode is set as the view mode for Camera and the animation is not set to the same mode, the program now stops on an assertion. In the Build version where assertions are disabled, the process returns without binding the animation if the modes do not match.
If the light source set for fragment light and vertex light does not match that for the animation, the program now stops on an assertion. In the Build version where assertions are disabled, the process returns without binding the animation if the modes do not match.
The Create methods of SimpleMaterialActivator, MaterialActivator and ParticleMaterialActivator returned IMaterialActivator as their return values. This has been revised so they now return their own respective classes.
Added the non-const version of the GetSampler function to the members of ResPixelBasedTextureMapper. (It had been left out.)
MIPMAP must be disabled when MIN_FILTER of a texture is LINEAR, NEAREST. Fixed problem by setting mipmap size to 0 when LINEAR, NEAREST.
When DynamicBuilder was used to generate fog and cameras, unnecessary memory would be allocated. That has been removed.
Deprecated the attribute enabling skeletal models of non-uniform scale (IsNonuniformScalable). If you are utilizing a user shader, you must revise the following registers:
IrScale c7-c9 → IrScale c7-c8 IsUniSc b3 → Deprecate UseNorM b4 → Deprecate
In addition, removed the corrective part of the normal vector of TransformMatrix.vsh.
If you do not make these revisions and use the default shader of 1.2, you will need to enable NW_GFX_USE_BONE_INDEX_SCALE of gfx_Config.h and rebuild.
Added the sample shader JShader. For details, see SampleData\Graphics\Shader\JShader\ReadMe.txt.
For the drawing of shapes, the GraphicsDrawing class now uses the GR library of the CTR-SDK, rather than DMPGL. In accordance with this, you now need to specify libnn_gr as the link library when linking applications that use GraphicsDrawing.
Additions and changed were made to the GraphicsDrawing class API functions. The following functions were added: DestoryShape, SetMaxShapeVertexCount and EndDrawingShape. In addition, you must now call the function EndDrawingShape function at completion of shape drawing. Names were changed for the following functions: InitializeShader -> InitializeShape; Setup -> SetupShape; and FlushDrawing -> EndDrawingString.
Added overload of GraphicsDrawing::InitializeFont for initializing font from font binary. When a conventional font file is imported, the font binary is destroyed by InitializeFont at the time of finalization, but when font binary is imported using the added overload, InitializeFont does not destroy the font binary.
Added a process using SetResourceBasedTransform for constraining.
A demo of fully baked skeletal animation has been added to MultiAnimationDemo.
Added a feature using the shape drawing of the GraphicsDrawing class to display meters showing the loads on the CPU and GPU. In the demo program, drawing is done using the NW4C and the GR library of the CTR-SDK.
For fonts, the demo programs now use the shared fonts that are provided by the CTR-SDK.
Added a missile demo that uses emissions, deletions and inheritance of speed by child particles.
Deleted ParticleMultiModelDemo/ParticleMultiEmitterDemo and merged them with ParticleCombinationNodeDemo.
The particle demo used by the nw::demo::ParticleEffect class is now binarized without including a shader resource. Instead, a separately loaded shader resource now is attached at runtime.
When vertices are exported in interleave format, the order of the vertex attributes is now optimized to reduce the amount of padding. When the BYTE and SHORT formats are used a lot, the size of the vertex data may end up smaller.
Added documentation that details the generation and destruction of particles, as well as documentation that combines notes on the use of particles.
As a result of adding the documentation on generating and destroying particles, reviewed and revised the content of the documentation on the Easiest Method of Use of particles.
VertexColorScale being set to 1 by SetAmbient of ResMaterialColorA bug caused VertexColorScale to be set to 1 when Color was configured by SetAmbient of ResMaterialColor. Revisions were made so VertexColorScale no longer changes.
Signal class GetMemorySizeForFixedSizedSignal functionA compile error would happen when the Signal class GetMemorySizeForFixedSizedSignal function was called. That bug has been fixed.
An ASSERT was inserted to make sure textures did not straddle a 32MB boundary as a restriction in the old hardware, but that item has now been deleted as an ASSERT condition.
There was a possibility that the GPU would stall because invalidation of the vertex load array, added in version 1.2.0, did not work correctly. Sometimes vertex data would become corrupted and the GPU would stall, if an attempt was made to render a mesh with a total number of VertexAttributes less than the number of VertexStream objects of the previous mesh after rendering a mesh with a large number of VertexStream objects. This bug has been fixed.
ShaderParameter is now invariably set when ShaderProgram has been changedWhen the User Shader was being used, sometimes materials without a configured ShaderParameter would render incorrectly. To correct for this, ShaderParameter is now invariably set when ShaderProgram has been changed.
The implementation has been revised in locations where memory was being allocated for size 0 within the library.
BranchVisible was added for preventing rendering below one's own node in the scene tree. When canceling rendering below a particular node in the scene tree, this function can be used to easily cancel rendering.
A function for returning the required memory size when creating some scene node and animation-related classes has been added. High-speed instance creation and destruction is possible by allocating the memory size returned by this function and distributing memory to high-speed heaps such as the frame heap. For details, see the documentation on the Builder class functions GetMemorySize and GetDeviceMemorySize.
A function allowing specification of the states that can be cleared by ResetState has been added.
ParticleMaterialActivator for making minimal material settings for particles has been added. Materials are automatically selected from RenderContext based on material flags. The processing cost of material settings that are not used by particles, such as lights, can be reduced by using this class. For details, see graphics documentation, and the features for particle and rendering processes.
There was a bug where abnormal blend results would result if NULL was set for an animation object by ReplaceAnimObject for AnimInterpolator without ensuring the integrity of weight calculations and blending. This has been fixed. If NULL is set, behavior is now the same as when an animation object without any animation members has been set in that index.
A bug has been fixed when billboards include scaling where scaling was being repeatedly applied each time UpdateView was repeated.
The initial transform scale when dynamically creating nodes, cameras, lights, or fogs has been changed to 1.0f.
A bug has been fixed when billboards include scaling where scaling was being repeatedly applied each time UpdateView was repeated.
Several changes have not been adopted as standard for compatibility between version 1.2 and 1.1. These changes can be introduced by disabling #define NW_GFX_PARTICLE_COMPAT_1_1 in gfx_Config.h.
LIFE, BIRTH, and NEG_TIMELIMIT for streams are handled using ParticleTime. This is the same as f32 if NW_GFX_PARTICLE_COMPAT_1_1 is enabled. Under version 1.3, a fixed point number consisting of sign plus 23-bit integer part plus 8-bit fractional part will be used.
NEG_TIMELIMIT will be abolished. Lifespan will be determined based on calculation using LIFE and BIRTH. To delete a particle, use ParticleCollection::KillParticle rather than using NEG_TIMELIMIT stream operations.
Work memory will no longer be used for emissions from emitters or child emissions. At present, after position information is created in a temporary buffer, it is actually applied to the stream, but is directly written to the stream. Several non-disclosed functions such as ParticleSet::AddParticles have been changed. Do not use these functions in applications because work memory for ParticleContext will not be allocated.
Although a list was being used for ParticleInitializer/Updater TargetStreams, this has been changed to store only a single value because only the topmost value could be obtained.
ResParticleInitializer::GetTargetStreamsCount ResParticleInitializer::GetTargetStreams ResParticleUpdater::GetTargetStreamsCount ResParticleUpdater::GetTargetStreams
have been abolished.
Instead, use GetTargetStream. This function returns a negative value if the stream does not have a valid value.
A bug was fixed where the wrong shape would result depending on the direction.
ParticleCollection::KillParticle removes the particle having the specified index.
ParticleCollection::SetLifeParameter sets the PARTICLEUSAGE_LIFE parameter.
Specifications have changed. Some memory required for particles was being obtained from device memory, but is now obtained from the main allocator.
Blend weight for each pass when using SetWeight has have been normalized under 1.1.0. With this change, normalization is performed only once during the first animation blend performed after execution of SetWeight.
A mode has been added for performing blending using the specified blend weights as-is without normalizing them. This allows the normalization process to be eliminated. For details, see AnimInterpolator::SetNormalizationEnabled.
An ASSERT is made if Builder class settings are illegal. There is no effect from this under the normal method of use.
Specifications have changed so that data images directly accessed by the GPU (textures, vertices, and vertex indices) are collected together in a contiguous area of a file and then output. There has been no change to the resource access method. However, the ResGraphicsFile::GetImageBlockData and ResGraphicsFile::GetImageBlockDataSize functions can be used to access image information in one big pile.
It is now possible to add bounding information at the index stream level in intermediate files. With this change, index stream bounding information can also be included in binaries, as long as bounding information for the index stream exists in the intermediate file, by specifying the option --index_stream_bounding during binary conversion. This implementation is currently experimental, and its method of use may change in the future.
Although glBindFramebuffer(NULL) used to be executed erroneously in the gfx library when NULL was specified to the RenderContext::SetRenderTarget function, specifications have changed so that gl functions are not executed.
An ASSERT has been added because the GPU will not function normally when texture images cross 32MB boundaries.
A bug was fixed where the direction of creating ZFlip settings for fogs fog tables were both being created in reverse. Although there is no change in behavior, note that ZFlip must be inverted when directly manipulating a fog table from within an application.
A but was fixed where all lights would go out, including fragment lights, when NW_GFX_VERTEX_LIGHT_ENABLED was disabled.
Specifications were changed so that DefaultShaderAutoSelector is applied only to materials that reference the shader named DefaultShader.
A bug was fixed where the last key set for a curve was being ignored when finding evaluation values beyond the end of that curve when the last key was set in a fractional frame
A bit flag named ResMesh::FLAG_VALID_RENDER_KEY_CACHE was added to mesh flags (GetFlags() method).
If the feature for caching keys for render sorting (see RenderQueue::Reset) has been enabled, the key cache can be re-created when Enqueue is executed by setting ResMesh::FLAG_VALID_RENDER_KEY_CACHE to 0.
A utility (Model::InvalidateRenderKeyCache) for disabling the cache at the model level has also been added.
Up to this release, fixed values were set as fixed vertex attributes for vertex attributes that do not exist in resources each time Draw was executed. In this release, however, command volume for setting vertices has been optimized by issuing commands that disable vertex streams that must be used after issuing the Draw command. If the RenderContext::ResetState function is executed, and the geometry shader is switched from a valid shader to an invalid shader, all vertex attributes are cleared after Draw is executed.
Features used frequently during particle processing have been added as methods to the new::demo::ParticleEffect and nw::demo::ParticleNode classes. In addition, several particle demos have been changed to use the above classes.
The option IgnoreNoAnimMember has been added so that animation members to be blended that do not exist in AnimInterpolator or TransformAnimInterpolator are ignored and excluded from weight normalization.
This behavior is the same as that prior to 1.1.0 and the same as that when true is specified for IsOldMethod. Also, note that IgnoreNoAnimMember and IsOldMethod share the same flag.
The IsOldMethodOption will be removed in 1.3.0.
A bug was fixed where certain processes were not being skipped correctly because the hash values in ShadingParameter and FragmentLightingTable were wrong.
A bug was fixed where Reset for model visibility animations was not working. The IsVisible flag on the resource side was also being overwritten erroneously during animation playback. Under correct operations, only the IsVisible flag on the instance side is changed.
A bug was fixed where the framebuffer was not being released after the OnScreenBuffer class would close.
Beginning from release 1.1.0, there was a bug where the GetLocation function in the ResShaderSymbol class was not returning the right value if a custom shader was created and original uniform definitions has been added. Data including the custom shader was therefore not being displayed normally. This bug has been fixed.
TextureLocationFlagSetter, IndexStreamLocationFlagSetter, and VertexStreamLocationFlagSetter (representing a utility class for specifying the memory location of the texture buffer and vertex buffer when using Foreach* functions) have been integrated and collected together in LocationFlagSetter. For compatibility, the original class name remains as a typedef in the LocationFlagSetter class.
To reduce the process load, the method for clearing the buffer has been changed from using glClear to a method that uses the most distant model. glClear is used as usual in LowLayer demos.
This demo can be used to find out the effect of applying scaling to ParticleModel, ParticleEmitter, or Particle objects, respectively.
ParticleApplicationDemo, ParticleCtrlEmissionDemo, ParticleRecycleDemo, and ParticleChokeDemo have been changed to use the nw::demo::ParticleEffect and nw::demo::ParticleNode classes. Demo contents have also been reviewed and changed.
The location of data used in demos has been changed.
The alignment of vertex index data was not being handled correctly. This bug has been fixed.
For English version, changed so that the English (en_US) version operates properly regardless of the use region settings.
The simple actual hardware Viewer has been abolished. From now on, be sure to use the official version of the Viewer released in 1.1.0 as the tool used to preview graphics data on actual hardware.
Specifications have changed so that a gl function is not used when texture data or vertex data is transferred to VRAM, and neither texture objects nor vertex buffer objects are created.
The SetLocationAddress and GetLocationAddress functions have been added to the resource class in order to use texture data or vertex data located at any address. APIs have been added to the following classes.
The address must be set before invoking Setup.
The FrameBufferObject class has been added for managing the address, size, and format of the frame buffer. The type of the return value from the IRenderTarget::GetBufferObject function has been changed from GLuint to FrameBufferObject.
Specifications have been revised so that gl functions are not used when setting the frame buffer GPU. The frame buffer color buffer address and depth buffer address can now be specified directly.
With this revision, you must always execute glBindFramebuffer within applications when rendering using gl functions. Either execute glBindFramebuffer even when using glClear, or use the nw::gfx::FrameBufferObject::ClearBuffer function rather than glClear.
Vertex arrays can now be represented using an interleave format. Since vertex arrays are interleaved by default during binary conversion from intermediate files, be sure to use the --force_separate_attribute option of the converter to export in a separate format.
OnScreenBuffer used to be generated with width and height of the render buffer reversed. Now it is generated as a vertical buffer similar to the actual size.
Because the width and height of the RenderTarget up to now were reversed, parts of code used to reverse these parameters for the Viewport as well have also been changed. Width and height are now used as-is even with the Viewport.
Code that uses IRenderTarget must be revised as follows.
(For example, parts of code where the aspect ratio is found based on the buffer width and height.)
The basic principle is to avoid having the gfx library correct the screen orientation. Note, however, that the demo library has been created assuming that the screen is wider than tall.
Specifications have changed so that NULL is returned when memory allocation fails for ParticleModel, ParticleEmitter, or ParticleSet. A NULL check must be performed on instances created by applications.
For optimization, specifications have changed so that the light direction is calculated first by SceneUpdater and then Direction of the Light class is copied. When changing the light direction, pay attention to the following points.
Parent node rotation is calculated or copied according to the inheritance flag from m_Direction of the ResLight class by the SceneUpdater function. Use ResLight::SetDirection if Direction is changed before executing SceneUpdater, or change Light::Direction after executing SceneUpdater.
Specifications have changed so that LightSetIndex and FogIndex parameter buffers, previously created using FLAG_BUFFER_SHADER_PARAMETER, are now created using FLAG_BUFFER_SCENE_ENVIRONMENT. When using these parameter buffers, be sure to created the buffer while specifying FLAG_BUFFER_SCENE_ENVIRONMENT.
Although a callback was not previously called when using the feature (FLAG_IS_WORLDMATRIX_CALCULATION_ENABLED) for skipping calculations, specifications have changed so that a callback is now always called.
Although MaterialIdGenerator was always created automatically within SceneInitializer in the past, specifications have been revised so that it is not created automatically. Either use SortingMaterialIdGenerator when creating SceneInitializer or set an independently created MaterialIdGenerator.
AnimFrameController user data used to be const void* type, but has been changed to void* type. With this change, the constructor for AnimFrameController has also changed.
Among definitions in the ResTextureCombiner::Combine class, the definitions of COMBINE_ADD_MULT and COMBINE_MULT_ADD were reversed. Since this bug has been fixed, unlike previous versions, SetCombineRgb and SetCombineAlpha in the RestTextureCombiner class will now result in correct behavior.
A bug was fixed where SafeDestroyBranchAll was calling SafeDestroy rather than SafeBranchDestroy.
The SetActiveCamera, GetActiveCamera, and GetActiveCameraIndex members of the SceneEnvironment class have been moved to RenderContext. In addition, specifications have changed so that the WScale setting for the render state, previously carried out by RenderContext::SetCameraMatrix, is now handled by SetActiveCamera. Before rendering, be absolutely sure to call RenderContext::SetActiveCamera and then set the camera to use for lighting calculations.
Although not supported as a both face culling setting up to this version, this has been officially abolished and unsupported because it is not supported by hardware.
Up to this version, it was possible to set up an OpenGL program object when setting pu a shader, without actually using it, but this has been changed so that program objects can no longer be created. If a GL program object is required, either perform gl setup automatically, or rebuild the library with NW_GFX_PROGRAM_OBJECT_ENABLED enabled in gfx_Config.h.
Although all nodes could be animated up to this version, an option for disabling animation at time of node creation has been added. This improves performance when updating nodes that are not animated. For details, see SceneBuilder::IsAnimationEnabled, SkeletalModel::Builder::IsAnimationEnabled, and so on.
There was a bug where blending of unmatched members was not carried out correctly when blending animations whose members did not match using AnimInterpolator or TransformAnimInterpolator. This bug has been fixed. Performance has been improved with this fix.
An option for restoring prior behavior has also been added. For details, see documentation on the AnimInterpolator::Builder::IsOldMethod option.
Although sorting up to this version used to be carried out by referencing ResMaterialData only, implementation has changed so that sorting is now performed in the order ResMaterialData, ResBinaryShaderData, and ResFragmentLightingTableHash.
Although it used to be necessary to call SetSampler when setting a sampler value for TextureMapper, this has been abolished and a separate variable accessor has been to the ResTextureSample class. With this change, the following parameters can now be changed dynamically.
Minimization and magnification filters (MinFilter, MagFilter); Border color (BorderColor); Repeat method (WrapS, WrapT); Minimum LOD (MinLod); and LOD bias value (LodBias)
Materials can now be shared among models by specifying the model having the material to be shared in SceneBuilder::SharedMaterialModel. This offers performance advantages when displayed more than one model having the same material settings.
Although UpdateView used to be called even for shared skeletons, behavior has been revised so that it is no longer called.
Specifications have been revised so that changes to the Skeleton::m_IsUpdated flag, that used to be made by SkeletonUpdater, are now made by SceneUpdater. With this change, application must set m_IsUpdated as necessary when directly using low-level API functions. For further details, see the LowLayerAnimationDemo.
When using ModelCoordinate, billboard calculations are not performed correctly. Always use WorldCoordinate.
Added a version of SetRenderTarget that passes the Viewport class.
The Material::Activate method has been abolished to optimize material settings. MaterialActivator is now called directly by ActivateMaterial in the RenderContext class.
UserParameter was added for use by users. This parameter can be obtained or set using Model::Set/GetUserParameter.
A function for generating ShadowMap commands was added to the GraphicsDevice class. Get/SetFragmentOperationMode was also added to the ResFragmentOperation class. For information on setting ShadowMap, see ShadowMapDemo.
The reference destination of the flag for skipping TransformNode calculations was changed from WorldTransform to Transform This matches the behavior when referencing Transform and skipping calculations during Bone calculations.
IsBranchWorldMatrixCalculationEnabled for skipping calculations for self and child nodes below has been abolished. FLAG_IS_WORLDMATRIX_CALCULATION_ENABLED can be used instead for TransformNode::Transform.
Named visibility that can be set at the node level under DCC has been added. The MeshNodeVisibilities member has been added to the Model resource. Meshes reference each corresponding ResMeshNodeVisibility, respectively. Visibility for meshes and mesh nodes can be obtained using Model::IsMeshVisible(). For details, see "How do I set mesh visibility using DCC node names?" in the FAQ.
Support has been added for visibility animations bound to named visibilities set at the node level under DCC. Initialization and playback is carried out according to the same procedure as other visibility animations.
OffscreenBuffer has been added for writing to textures.
Up to this version, only one AnimObject could be bound to a model, but in this version a change has been made to an interface that allows multiple animations to be bound. If multiple bound animations interfere at the same place, data is overwritten by the last animation evaluated. For details, see PartialAnimationDemo. Be sure to use blender as usual when blending multiple animations.
An API member function was added for swapping each table in ResFragmentLightingTable. Settings are made as with ResFragmentLightingTable::GetDistribution0Sampler().SetSampler(ResImageLookupTable).
BaseAnimEvaluator::SetStartFrame() and BaseAnimEvaluator::SetEndFrame() were added as API member functions for changing the start frame and end frame of animations for BaseAnimEvaluator.
BaseAnimEvaluator::ResetFrame() was also added as an API member function for resetting frames.
The functions GetUserData() and SetUserData() were added to BaseAnimEvaluator for accessing AnimFrameController user data.
FLAG_IS_VIEW_DEPENDENCE_FORCE_CALCULATION_ENABLED has been added as a flag to always force View calculations even if FLAG_IS_WORLDMATRIX_CALCULATION_ENABLED has been set to 0 by SkeletonUpdater::UpdateView. The default value is 0. Set to 1 to force calculation of View.
A change has been made to constructors that require specification of size and memory because memory is not allocated inside constructors.
RelativeHashMaterialIdGenerator was abolished. Be sure to set either SortingMaterialIdGenerator or an independently created IMaterialIdGenerator.
The initial value of the IsFixedSizeMemory parameter used by Builder of SortingMaterialIdGenerator from false to true.
Specifications were changed so that SetStepFrame(1.0f) is called internally.
Unused members of ResImageLookupTable have been deleted.
The macro definition name for enabling this feature has been changed from "ENABLE_MODEL_TRANSLATE_OFFSET" to "NW_GFX_MODEL_TRANSLATE_OFFSET_ENABLED". This definition has been moved from "gfx_RenderContext.h" to "gfx_Config.h".
This provides support for SkeletalModel objects whose Model Translate Offset is no ParticleModel or Model Coordinate.
If this feature is enabled, the value of "RenderContext::ModelTranslateOffset()" is calculated for the world matrix when rendering various models.
The following functions have been added for creating empty animation resources that have no animation.
A special version pointer has been added to Foreach* of ResGraphicsFile. Information from function objects after Foreach can now be obtained by passing function objects and so on as pointers.
ForeachModeMaterial has been added for calling a function object for each ResGraphicsFile material. With this addition, the DefaultShaderAutoSelector operator has been revised for use with this function.
The TryBind() binding function has been added. It returns nw::gfx::Result to animation objects such as AnimEvaluator.
Although the original value of material animation groups used to point to the start address of the material object, this has been changed to the address of the corresponding parameter. With this change, values can be used just like the original values of other animation groups.
Implementation of code has been moved to a header file because SubmitViewInternal of SceneUpdater could not be inherited and used. Because implementation has been moved to the header file named gfx_SceneUpdateHelper.h, be sure to include this header in sources that require it.
SceneBuilder::BufferCount, specified when creating models, has been abolished. Determination of whether there is a buffer can be made using only SceneBuilder::bufferOption.
By using FastEnqueueModelFunctor or FastEnqueueSkeletalModelFunctor of the RenderQueue class, depth calculations are not made for meshes other than in render layer 1 (translucent layer).
Finally, make sure quantization of depth data is skipped by using CreatePriorMaterialAndZeroDepthRenderKeyFactory with the Factory used to create RenderKey.
Parts of code that use SORT_DEPTH_OF_TRANSLUCENT_MESH_ENABLED, in demo_GraphicsSystem.cpp of the demo library, may serve as reference.
The GetOwnerData function has been added. This function is used to get the ResTextureMapper that owns ResTextureSampler.
Behavior has been changed so that processing continues with a warning rather than an error if no allocator has been set when using CommandCacheManager::Free.
User data was added to the ResSkeleton resource. User data can be added to skeletons under CreativeStudio.
A bug was fixed where the value of components without an animation were illegal if a curve was applied only to some components.
If there were multiple keys in the same frame, it would become undefined as to which key to use for the evaluation value of that frame. Code has been revised so that the last key value is always used.
In order to optimize subsequent calculations, the scale value of WorldTransform::Scale of TransformNode and Skeleton has been changed to a scale value that includes one's own node (bone). If you need the conventional scale value, get the scale value of the parent node (bone).
In past versions, if the playback rate exceeded 1, emission from the previous evaluation time up to the scheduled emission stop time was not performed if the emitter's emission time had ended at time of evaluation. This was changed so that the number of particles expected to be emitted are actually emitted.
Vertex parameter values can now be changed using ParticleCollection::SetParameter.
An array for storing ParticleEmitter and ParticleModel only has been added to SceneContext to increase speed. Be sure to set an upper limit as necessary using Description.
A bug was fixed during emission from an emitter or child emissions where the time difference with the AnimFrameController being emitted to was not being taken into account.
For builds other than release builds, a check has been added to make sure that the value of the matrix set for the particle shader is not NAN. In the case of debug builds, all stream data is checked.
The PARTICLEUSAGE_ID stream has been abolished to increase speed. If a unique ID is required for each particle inside ParticleSet, you can utilize the fact that particles born at the same time have different ACTIVEINDEX values and combine the values of LIFE (f32) and ACTIVEINDEX (u16).
Because there was an error in the name of RENDER_COLOR_FORMAT_RGB565_OES in the enum definition of RenderColorFormat, it has been renamed RENDER_COLOR_FORMAT_RGB565.
Support has been added for "Randomize specified direction, allowing elliptical shapes to be emitted by specifying "Direction" and "Random angle".
A register name and associated definition name in VertexShader.h were incorrect in terms of the processing represented, so they have been changed.
Register TexPos(0,1,2) has been changed to UvMap(0,1,2)
The definition name nw_texture_coord_position(0,1,2) has been changed to nw_uv_mapping(0,1,2)
The behavior of billboards parallel to the screen, when an uneven scale is applied to a model, has been changed.
Projection shadow and shadow map demos have been added. For details, see the Function Reference demos.
ContraintDemo has been added. For details, see the Function Reference demos.
LowLayerAnimationDemo has been added. This demo plays skeletal animations without using scene graph features or the demo library render system.
Animation blend-related demos have been removed from AnimationDemo, and AnimationBlendDemo has been added.
The demo AnimationChangeDemo has been added. This demo dynamically switches animation resources held by animation evaluation.
PartialAnimationDemo has been added. This demo binds multiple animation evaluations to a single model and plays partial animations.
DynamicMaterialDemo has been added. This demo dynamically changes material settings. Descriptions are included for lookup tables, textures, material buffer, independent material settings.
This is the particle version of LowLayerDemo. ParticleLowLayerDemo has been added. This demo plays particles without using scene graph features or the demo library render system.
Processing used for camera control by CameraController in demo programs was incorrect in that changes to the camera position and camera matrix did not match. The order in which updates are made has been changed to resolve this problem.
Specifications have changed so that all FCRAM memory is obtained from device memory. In addition, specifications have changed so that the heap is managed for each heap. Particle-related memory can now be obtained from another allocator.
Specifications have been revised so that normals and tangents are deleted from shapes during binary conversion if the vertex light, hemispherical light, or fragment light of a material has become invalid. If you require output of normals, be sure to enable material lighting beforehand.
Specifications have been changed so that the vertex array is output in interleave format during binary conversion. To output in separate format, use the --force_separate_attribute option.
Because the --auto_create_shader option is disabled even if specified when executing a script file, specifications have been revised so that a warning is displayed if the option is encountered.
The simple actual hardware Viewer is scheduled for abolishment in NW4C 1.2.0. In the future, plans call for addition of features to Viewer as needed for use as an actual hardware preview tool.
Although a 256-word register setting was being used to set LookupTable in the GPU, this was not safe processing for the GPU, so it was split into two 128-word register settings. Along with this revision, the binary version of ResLookUpTableSet has been updated.
Even if a buffer was being used when adding meshes to the render queue, some parts were being referenced by the original transparency. This was changed.
Fixed a bug where DisconnectAndDestroy of Signal would result in a compiler error.
ChangeAnim did not function correctly if the number of animation members of ResAnim differed before and after switching animations.
(Transform)AnimEvaluator::Builder::MaxAnimMembers was added along with this revision. For the appropriate values to set, see the reference manual.
We made it so texcoord1 is output for multi-textures. The contents output are the same as for texcoord0.
There was a bug due to low accuracy when calculating the rotation matrix where the error in the UV coordinates for each pattern would appear large if a texture pattern animation was split into many divisions. This bug has been handled by increasing the accuracy of trig functions.
There was tearing of the upper screen because the display buffer swapper for the upper screen (right eye) was not set correctly. The setting has been corrected and the tearing problem resolved.
The API was changed as given below in order to create material IDs based on the relationship between materials.
Added Begin() and End() for pre-processing and post-processing of scene initialization. These functions must be called before and after Accept() is invoked on the SceneNode.
SceneInitializer::Begin(); SceneNode::Accept(SceneInitializer); SceneInitializer::End();
Added the function Accept(Material* material) = 0; called from SceneInitializer::Visit(). Changed the Generate function called from SceneInitializer::End()
With this change, similarities between materials can now be calculated by MaterialIDGenerator.
Added a visible flag and the functions IsVisible() and SetVisible() for manipulating it to the model class. Only this flag is referenced at time of drawing. The visibility flag for the ResModel class is only used as the initial value of the visibility flag included in the Model class. Note that after the model class is created, the visibility flag of the ResModel class has no effect even if changed using the SetVisible function.
Specifications have changed so that the flag for the model class can be controlled for visibility animations as well.
Along with fixing this problem with billboards, a local transform for parent nodes has been added as an argument to the Update method of WorldMatrixUpdater. In addition, the scale value of WorldTransform calculated by WorldMatrixUpdater has been changed from the same value of the LocalTransform to the accumulated scale up to an including parents. With this, the IS_CUMULATE_UNIFORM_SCALE and IS_CUMULATE_SCALE_ONE flags have been eliminated.
In addition, for further optimization, the Update method of WorldMatrixUpdater has been split into UpdateMaya, UpdateXsi and UpdateBasic. Matrix updates made via SceneUpdater have no effect.
Prior to this version, the bind pose value was copied for each from for elements not including animation. This has been changed so that a copy is made only once at time of binding.
Note that with this change the correct skeleton pose does not result between calling TransformAnimEvaluator::Bind() and initial animation evaluation.
If the evaluation result cache for related information is not needed, the process load can be further reduced by setting TransformAnimEvaluator::Builder::AllocCache() to false. This has been set to true in AnimationDemo of the past.
The speed of processing has been increased when there are many members that can be animated, but only a few members to actually be animated. Effects are shown when there are many materials. This does not include cases when using AnimBlender.
Added the AnimEvaluator::ChangeAnim() and TransformAnimEvaluator::ChangeAnim() functions. Use of this method is faster than destroying AnimEvaluator and then playing.
Added the AnimEvaluator::GetPlayPolicy() and AnimEvaluator::SetPlayPolicy() functions.
Also, the return value of GetAnimData() has been changed to const nw::anim::ResAnim. This was done to avoid confusion because there is no effect on AnimEvaluator operations even if the content of ResAnim is changed.
A bug was fixed by adding an IsUpdated flag to skeletons so that update is not made more than once per frame.
The position of point lights and spotlights was being calculated in the local coordinate system. (The coordinate system of the parent was not being inherited.) The resource's Transform value was also being used, but specifications have changed so that an instance is used instead.
A bug was fixed where render commands could not be inherited and could not be used due to spelling mistakes and other issues. A RenderCommand test was added to SceneTreeDemo.
DynamicBuilder has been added so that textures can be created dynamically. A created texture can be replaced by using SetTexture() of TextureMapper.
This allows lights to ben enabled/disabled. Animation is also possible. This flag is only enabled when the scene environment light set includes the target light.
Resource-related classes (gfx_Res and anim_Res) have been moved to the res folder and the namespaces have been respectively changed from gfx to gfx::res and from anim to anim::res. Using can be used as usual to use a resource-related class from the gfx and anim namespace. However, includes in the header file must be changed from nw/gfx/~ to nw/gfx/res/~ and from nw/anim/~ to nw/anim/res/~.
Light animations are initialized and played back using a procedure similar to that for camera animations. See gfx::ResGraphicsFile::GetLightAnims(), gfx::Light::GetAnimGroup() and gfx::Light::SetAnimObject().
In billboarding, Rotate and Scale were not applied to bones and nodes above the parent. That problem has been corrected.
Changed the defined names for transparency types for Layer0 through Layer3. Previous names remain for compatibility.
Although a matrix that combines Rotate and Translate has been used up to now, specifications have changed so that Rotate and Translate components are handled separately like the Scale component. This change reduces the binary size for animations without a Translate component.
A bug has been fixed where the Translate component would be overwritten by the bind pose value when playing a frame format skeletal animation for which only Rotate was being animated.
This problem would appear when multiple models with difference bone shapes shared the same animation.
The following library build is required to use this feature. Build the library with the ENABLE_MODEL_TRANSLATE_OFFSET macro located in the gfx_RenderContext.h file enabled.
The offset value is set using the RenderContext::ModelTranslateOffset() method.
The reset process for lights, cameras and fogs that used to handled by the Reset method has been split up into separate reset processes such as ResetFragmentLights. The Reset method calls each of these separate Reset methods internally.
Old specifications called for an internal check to this point to be made and NULL to be returned if an out-of-bounds value was specified for the index of the following functions, but this has been changed so that execution terminates on an ASSERT.
As in versions up to this one, an index range check is performed internally and the result of that check is returned safely for overload functions, GetMatrix(int, MTX34**) or GetTransform(int, Transform**) that returns a bool value as a result
Execution used to crash inside Model destructors under the conditions given below.
Up to this version, the nw::gfx::GlSystem::SetGlManager function was used first to get the GL state within nw::gfx and it was necessary to set a pointer to OpenGL management data. Since this function is no longer needed, it has been deleted from the API.
At the same time, an API function for getting program object parameters included in nw:gfx::GISystem has also been deleted. nw::gfx::ShaderBinaryInfo can be used if you need to get shader program parameters.
You can select the model to be displayed under unique conditions by specifying a class derived from the ISceneUpdater::IsVisibleModelFunctor class to the isVisibleModel argument of SubmitView.
In previous versions, there was a large difference in the effect of the value of ResMaterial::Polygon offset between using a 24-bit format or a 16-bit format for the depth buffer format due to a problem with the precision of 24-bit floating point numbers in hardware. This has been revised to obtain closer effects than previously possible by applying a scale of 128 when using a 24-bit format for the depth buffer.
Up to this version, specifications were such that ResMaterial::PolygonOffset was disabled if a value other than 0 was set for wScale. Specifications have been changed so the value of PolygonOffset is applied even when wScale is enabled.
Note that preview under CreativeStudio differs from the display on actual hardware and that PolygonOffset is not applied when wScale is enabled, because, under PicaOnDesktop specifications, PolygonOffset is disabled if wScale is enabled.
The API functions GetMask and SetMask for getting and setting StencilMask information not maintained by the ResStencilOperation class existed by mistake. These functions were deleted.
Be sure to use the nw::gfx::GraphicsDevice::SetStencilMask() function when setting StencilMask.
There was a bug where dynamic changes to the CullingMode were not being applied correctly when FLAG_BUFFER_RASTERIZATION was enabled using the buffer options of nw::gfx::Model. This bug has been fixed.
The unimplemented classes IRenderPass, ISceneRenderer and SceneRenderer have been deleted.
A bug has been fixed where fog was not being applied correctly when using wScale with an index fog specification.
CalculatedTransform::m_Flags was left uninitialized if the evaluation result cache was enabled. Depending on the content of memory, flags would be unexpectedly set, resulting in incorrect behavior.
Up to this version, execution used to stop on an ASSERT due to GPU hardware limitations if texture straddled a 32MB boundary. However, ASSERT conditions have been changed because it has been discovered that there actually is no restriction on GPU hardware.
SortingMaterialIdGenerator has been added for sorting in material order and attaching material IDs in order. Models sorted in order of material can be used by creating material IDs after Accept by SceneInitializer by passing SortingMaterialIdGenerator during SceneInitializer creation.
GL functions would become unusable upon generation of a GPU command. Along with this, vertex resources such as ResPrimitive, ResVertexAttribute, etc. are no longer internally generated. Use ParticleCollection functions for things like getting pointers to streams in the vertex buffer to avoid accessing ParticleShape.
This function is now called automatically within the library. Although there is no need for applications to make this call, the function definition remains for compatibility. This definition will be discarded in the next release.
Specifications have changed so that determination is made using PARTICLEUSAGE_NEG_TIMELIMIT to make things easier to handle using user-defined updaters. There is no change in behavior with conventional use.
Because GL functions are no longer used, SDK functions are now used when VBO flush has been explicitly executed.
Shaders corresponding to the number of textures have been added to NW4C default shaders (shaders/nwgfx_DefaultShader.csdr and auto_create_shader).
Select the shader corresponding to the number of textures for each material by specifying as shown below before resource setup. resourceSet->resource.ForeachMaterial(nw::gfx::DefaultShaderAutoSelector());
However, if the number of textures changes dynamically, this setting must also be changed uniquely.
Also, changes have been made to several registers. User shaders must be changed. The changes are as follows:
Boolean Registers
Floating Point Number Register
A bug has been fixed where Rotate and Translate were not being applied correctly when using a perspective camera with projection mapping. The effect was that projection mapping could not be used with Texture 2. Also, the following changes have been made to register assignments for shaders.
Constant Register
Added the definition of ENABLE_MODEL_TRANSLATE_OFFSET to ShaderConfig.h. You can enable an option to add a feature for applying an offset value to the translation value of a model in the shader by enabling this definition. This function can be enabled by enabling the definition of the same name in RenderContext.h.
Sometimes lighting was not being calculated correctly if the inner project of the view vector and normal vector was -1. Correct calculations are now possible by using clamping during the calculation.
A spelling mistake (or mistakes) were corrected in the following API function (or functions).
The command list is now double-buffered to improve performance. The CommandListSwapper class controls this.
MultiInstanceDemo, capable of dynamically adding and removing skeletal models to be animated, has been added.
MultiAnimationDemo, capable of switching multiple animations for display, has been added. The following types of animations can be displayed.
ParticleMultiEmitterDemo is a demo that places several emitters and sends them to the same ParticleSet. ParticleMultiModelDemo places multiple combinations of emitter and model.
All demos except SimpleDemo have been changed to use stereo display. StereoDisplayDemo was deleted along with this change.
Among the load meters displayed in the lower screen of demo programs, the GPU meter has been changed. Time required for rendering is displayed under GPU, while time required for processes other than rendering, such as buffer transfer and load display, are displayed under GPU other.
During demo program execution, pressing the START Button on the pad restarts the demo. A check for memory leaks is made at this time. A message appears if there has been any change in memory usage since initial demo startup.
A bug has been fixed where the display of textures would crash if a texture pattern animation was played under CreativeStudio and then transferred to the viewer.
This bug would not occur if binary output was performed using gfxviewer.bat.
A bug was fixed where the only the lower two bits of LayerId was being set during RenderElement key generation.
A bug was fixed where ParticleLayerId was not being set by SceneUpdater::SubmitView.
The following SceneUpdater methods were changed from protected to public.
There was a problem with GraphicsDevice initial values where ColorMask was sometimes being set incorrectly and models were not being displayed. This bug has been fixed.
A bug was fixed where the VBO address was wrong in the double-buffered command cache for particles when creating back faces.
A bug was fixed where calculations were not being made using values as a percent.
A bug was fixed where a sphere shape would not result due to incorrect calculations when the emitter shape was a sphere.
AnimFrameController::SetPlayPolicy(u8 loopMode)There was a problem where overload resolution with SetPlayPolicy(PlayPolicy playPolicy) was impossible when 0 was passed in an argument. The u8 version of this function will be abolished in the 1.0.0 release to simplify the interface.
Evaluation results were incorrect if the current frame and key position were equal. This would result in problems such as incorrect timing for switching textures in texture pattern animations.
A bug was fixed where the command was not being correctly set. Data must be re-converted. Execute nw::gfx::GraphicsDevice::SetStencilMask(true); to enable stencils.
Cameras could not be operated when a camera animation was set for a camera other than the camera used for rendering.
Although bindings were reflected correctly under CreativeStudio preview, they were not being reflected when using the simple actual hardware viewer.
The SetLayerId and GetLayerId methods were added for models. This is logically OR'ed with the LayerId set by SubmitView.
The value of a fractional frame is found using linear interpolation to find the value of the previous and next frame. This algorithm emphasizes accuracy over speed.
Reference argument versions of SetTransformMatrix() and SetRotateMatrix() have been created.
There was a problem when creating render keys using depth priority where the render priority was not being correctly reflected. There was a possibility that translucent materials would not be displayed correctly because depth priority sorting was established as default. This bug has been fixed.
Render priority can be set to one of 16 levels, from 0 to 15, when using material priority.
The SceneUpdater::UpdateAll() function has been added. In addition to the processing provided by UpdateWorld() in versions up to this one, this function also updates animations. Using this function eliminates the need to call Model::UpdateFrame() or AnimBinding::Evaluate().
Plans call for abolishing UpdateWorld() in the 1.0.0 release. Please migrate by that release.
ResGraphicsAnimGroup::EvaluationHint has been reorganized. Plans call for abolishing old enumerator values in the 1.0.0 release. Plans also call for changing the name to EvaluationTiming. In the future, programmers will not need keep track of update timing if they use SceneUpdater::UpdateAll().
Old:
New:
Made it so an assert is made if an attempt is made to delete a node that is not one's own child. Although the parent of the child node would be NULL under problematic usage of this function up to now, this type of behavior has been eliminated. If an assert is issued, be sure to change code so that the caller executes DetachChild from the right parent.
The VBO double buffer is used to reference the previous position inside the library. Even if a double buffer is not required for rendering, be sure to call the ParticleSceneUpdater::SwapBuffer() function.
Due to problems with the processing order of child particles up to this version, the ordering of child particles has been moved to the very end. This may cause the position at which child particles appear to shift one frame compared to prior releases.
The default shader for particles was changed to support a feature for correcting the scale and rotate settings of particles at time of rendering.
Along with support for SceneEnvironmentSetting, the class name RenderEnvironment has been changed to SceneEnvironment. Although the name RenderEnvironement remains as a typedef, plans call for its deletion in the future.
This provides a feature equivalent to NW4R's scene animation. Scene environment settings, gathering together the lights, cameras and fogs required to render a mesh, can be created under CreativeStudio. LightSet, Camera and fog are added to RenderEnvironment by applying these scene environment settings (SceneEnvironmentSetting) to a SceneEnvironment that includes RenderContext. RenderContext selects the LightSet, Camera and Fog to be added to the SceneEnvironment based on a materials LightSetIndex and FogIndex.
For backward compatibility, features for directly setting the light, camera and fog in SceneEnvironment still remain. If render environment settings have been applied, note that settings made by the program are prioritized and applied.
Builder was added with plans to abolish the Create method so that SkeletalModel can be flexibly created.
RenderMode was added to RenderContext. Material settings can be ignored by setting RENDERMODE_IGNORE_MATERIAL into RenderMode.
A spelling mistake (or mistakes) were corrected in the following API function (or functions).
A utility function was added for directly controlling view updater and projection updater parameters from the camera class.
A Reset() method was added to the AnimEvaluator class for restoring animation targets to initial status. If performed on materials, you need to create a material buffer. Set the options for MaterialBufferCount() and BufferOption() when creating models with the SceneBuilder class. For BufferOption you need at least Model::MULTI_FLAG_ANIMATABLE_MATERIAL.
Registers were hard for users to use because vertex light settings after UnivReg were used. Vertex lights did not use a register beyond the user register start offset. For details, see SampleData\Graphics\Shader\UserShader.
Camera animations are initialized and played back using a procedure similar to that for material animations. See gfx::ResGraphicsFile::GetCameraAnims(), gfx::Camera::GetAnimGroup(), and gfx::Camera::SetAnimObject().
The correct unit is radians. This problem occurred only when InheritingRotate was turned off for ViewRotate.
Fog is now supported at actual hardware runtime.
This is used to calculate GPU processing time required for code between Begin() and End().
Added the W scale parameter to Camera. The fog updater now supports w buffer.
A bug was fixed where Softimage format data whose scale values had changed were not being rendered correctly.
A type of TopPriorDepthRenderKeyFactory was added to the class for creating keys for sorting. Create keys using the following methods.
A render sort mode specification has been added to ISceneUpdate::SubmitView.
ALL_MESH_BASE_SORT is set in the argument renderSortMode.
All resource class binary format versions have been updated because the method for creating resource class type information has changed. Reconversion is necessary because old version binary cannot be used.
Corrected the following bugs:
Incorrect evaluation results would occur if the StartFrame attribute of <BoolCurve> tags in an intermediate file was not 0.
A change was made to the same algorithm used under NW4R where the normal is used. To use a method that uses the reflection vector as used up to now, disable NW_NORMAL_ENV_MAP inside Shader.Config.h and then create a shader binary.
When re-using a command created for the left eye with the right eye in the case of a stereo display, the values set by the graphics library for the shader's view matrix and projection matrix could be used as-is without overwriting them. However, the value of the constant register would sometimes be corrupted when using a geometry shader.
To avoid this, the order of constant registers for nwgfx_DefaultShader and nwgfx_ParticleDefaultShader was changed. Users who create custom shaders must accommodate this change in register numbers.
A bug was fixed with AnimationDemo where models from one frame ago were being rendered. Models were being shown in their bind pose in the first frame.
ParticleApplicationDemo was added as a practical model. Along with this addition, a class for particles was added to the demo library.
A similar feature implemented in a NintendoWare for Revolution demo program was ported. The operation method is output in the debug log.
A user shader sample was added to SampleData\Graphics\Shader\UserShader. Refer to this sample if you are customizing a shader.
Specifications have been changed so a warning is displayed if --auto_create_shader=[on/off] is not specified when outputting binary data using NW4C_CreativeStudioConsole.exe. To get rid of this warning, either forcibly include the default shader in the binary or explicitly specify the --auto_create_shader command argument.
A bug was fixed where, if more than one input file was specified for NW4C_CreativeStudioConsole.exe, loading of files was handled as successful if any of the files loaded successfully, even though others may have failed to load.
Only LookAt type cameras can be controlled by pad input. However, they cannot be controlled during animation playback.
A bug was fixed where transfer of data from CreativeStudio to Viewer would frequently fail.
When reloading files, the path to the loaded file is output to the debugger.
Up to this version, even unused texture units were enabled during rendering. However, due to this fact, there was the possibility that a hardware bug when using multi-textures for L4 or A4 textures might occur only with multi-textures. Usage restrictions beyond the hardware limitations no longer apply now that unused texture units are correctly disabled. Depending on the situation, fill performance for materials having only one or two textures may be improved.
A bug was fixed where internal vertex attributes of the gfx shader were not being set correctly when the shader had been switched.
A bug was fixed where the same texture in the same material (or the hash value when a table was specified) was not being correctly calculated.
Buffers used to be swapped inside ParticleSceneUpdater::UpdateNode, but this is now handled by an explicit API function call for more flexible functionality. Call ParticleSceneUpdater::SwapBuffer after render command creation. Note that the definition of enum ParticleBuffer has changed. If you have been using PARTICLE_BUFFER_{CALC,DRAW}, be sure to replace it with PARTICLE_BUFFER_{FRONT,BACK}.
ParticleSet::ClearParticleCollection used to be protected but has been changed to public. The ParticleEmitter::Reset function was added.
A problem was corrected with the display of cube maps by the library.
The following demos have been added.
Along with command cache support, the LookupTableCache class was abolished. A lookup table cache conforming to hardware specifications is now implemented using SetLookUp table of the RenderState class.
ForeachTexture, ForeachIndexStream, and ForeachVertexStream were added to ResGraphicsFile. TextureLocationFlagSetter, IndexStreamLocationFlagSetter, and VertexStreamLocationFlagSetter were also added. Code like that given below can be used to change the location that textures are loaded. graphicsFile.ForeachTexture(nw::gfx::TextureLocationFlagSetter(NN_GX_MEM_VRAMA | GL_NO_COPY_FCRAM_DMP));
A bug was fixed where NEAREST_MIPMAP_NEARSET would result for rendering if the compression filter setting was LINEAR_MIPMAP_LINEAR.
The default shader was not being automatically attached up to this version if more than one shader binaries were included in a target file when converting using NW4C_CreativeStudioConsole.exe with --auto_create_shader=on. This specification has been changed so that nwgfx_DefaultShader and nwgfx_ParticleDefaultShader are always attached when --auto_create_shade4r=on has been specified.
Currently, when creating scene objects with SceneObject::Builder, duplicate child layer objects are created when a model has a hierarchical structure. The SceneObjectFactor class for creating scene objects and SceenTreeHelper for resolving tree structure references have been added to avoid this.
A particle FAQ was added to NintendoWare\CTR\documents\Graphics\ParticleFAQ.pdf. This can also be found through links to the document library.
Optimization options using #pragma have been changed only fa resulting in the bug.
The GPU load meter displayed is not entirely accurate and should be used for reference purposes only.
The MaterialProxy class was abolished and IMaterialActivator was added. Material settings are no longer made when consecutively setting the same instance of a material.
Lookup table setup that used to be performed at runtime is now performed during resource setup. With this change, texture objects are now resolved by ResLookupTable::Cleanup.
The Shader class has been abolished. ResShader is now used directly. Also, the ShaderProgram class has been moved from Material to RenderContext.
The roles of RenderScene and SwapBuffer in the demo library have been reviewed now that stereo display is supported. SubmitView, used for camera-dependent processes has been split off from RenderScene so that RenderQueue can be created for any camera. Also, detailed specifications are now possible for Swap in the demo library. With this change, you now need to call WaitCommandList, SwapBuffer and WaitVSync separately from application instead of the conventional SwapBuffer. For details, see StereoDisplayDemo.
RenderStereoScene creates right and left video by rendering once and then re-using commands. With this, the way the shader's ViewMatrix is handled is different.
The performance meter has been changed to show values that exclude font rendering and buffer transfer.
Destroy branch was added to SceneNode for destroying one's self and all children beneath.
LowLayerDemo was added for using only the low layer of graphics.
Specifications have been adjusted so that render elements are arranged to reduce the render processing load.
Now that a command cache is used, the FloatColor, VEC3, VEC2 and Rect resource class members must be set using a Set accessor. Also, a command is now created by making settings using a Set accessor even when setting some materials.
Swizzle inversion of shaders by having the CPU invert xyzw is not longer required.
A class was added for calculating material IDs from the ResMaterial hash. Materials can be updated more efficiently by sorting using this class. Settings to the scene tree can be made using SceneInitializer.
A binary file reload feature has been added. A target preview feature has also been added for receiving notifications of binary output from NWCS and reloading data.
An Introduction page was added along with a description of dependencies among modules. A Scene Tree page was added along with simple class diagrams for the scene tree and tables for comparison to NW4R. A Rendering and Coordinate Systems page was added along with descriptions of coordinate systems used during rendering.
The shader for particle rendering is now dedicated. When using particles, be sure to use nwgfx_ParticleDefaultShader.csdr. When --auto_create_shader=on is specified as a converter option, data is created in combination with the default shader for particles.
Particle::Clear() and ParticleSet::ClearParticleCollection()
Related APIs: ParticleEmitter::UpdateParticleFrame(), ParticleEmitter::ParticleAnimFrameController(), ParticleModel::UpdateParticleFrame(), ParticleModel::ParticleAnimFrameController()
A bug was fixed where the correct scale value did not result when the LUT scale was 0.5 or 0.25. Since this problem affects binaries, reconversion is required.
The DepthFormat function was added to IRenderTarget::Builder for specifying the depth buffer format. With this addition, the name of the API function for specifying the color buffer format has been changed from Format to ColorFormat. Names have changed in each demo program to reflect this.
A RenderEnvironment class that includes a render environment for lights and fogs managed by RenderContext has been added. A specification such as SetFragmentLightsDirty must be made for this class when changing things like lights using a callback.
This revision concerns a problem where lighting was strange.
The nw::gfx::CommandCacheManager class has been added. An allocator must be set using the SetAllocator method before using the graphics library.
Memory required by the allocator from gl when using nngxInitialize must be set for nn::gx::GlSystem::SetGlShManager. Be sure to set memory equal in size to GlSystem::SHADER_MANAGER_BUFFER_SIZE for the GlSystem.
The requirement that vertex uniform xyzw must be swizzled to xzyx within the shader when creating a user shader has been abolished in the command cache support evaluation release.
With this change, the MaestroTableCache/ResMaestroTable classes have been renamed LookupTableCache/ResLookupTable.
A change has been made from a format where lighting-related lookup tables directly maintain materials or lights to a format that can be shared in common as a lookup table set.
The profile in the library can be enabled by defining NW_PROFILE_ENABLED in dev_Config.h.
Each process load can be displayed separately by defining DEMO_GPU_PROFILE_ENABLED in demo_GraphicsSystem.h.
A matrix for projection has been added to the arguments for the Update method of CameraProjectionUpdater.
Changed ResGraphicsFile animations to a list by type. Be sure to revise code to use GetSkeletalAnims in place of GetAnims().
Note that specifications have changed so that calculations are made using world coordinates by default. To calculate in model coordinates, specify FLAG_MODEL_COORDINATE in Flags of ResSkeleton.
A bug was fixed where there were leaks when freeing ParticleShape resources.
Capacity, used with ResParticleShape and ParticleShape, has been deleted. Time-related parameters have been standardized as f32 types. References are now resolved outside the library. (See ParticleDemo.)
This has been changed so the table created differs depending on the IsAbs flag.
A big was fixed where scale animations were sometimes not played correctly in the case of skeletal animations.
Now that the camera updater is created from resources, setup functions such as SetAspectRatio have been deleted. Functions for getting resources have been added in their place, so be sure to change code to get resources. For details, see the code for creating a camera updater in SimpleDemo.
Render order can now be sorted based on materials or depth data.
typedefs are used so that old names can still be used for awhile. Plans call for abolishing old names in the next release.
The particle feature added to CreativeStudio is now supported.
omake must be executed before running a PC version demo.
CONFIDENTIAL