Commit Graph

86 Commits

Author SHA1 Message Date
fincs
00396e8a99
Fix for libctru v2.3.0 2023-10-28 21:57:00 +02:00
oreo639
66a0594e5d Add C3D_LightEnvBumpNormalZ()
Used to configure whether the Z component of the normal map is used or if
the Z component is reconstructed based on the XY components of the normal map.
2023-08-12 16:52:36 +02:00
oreo639
e8825650c6 Correct typo in tex3ds docs 2022-08-06 11:43:21 +02:00
fincs
e2992d276f
Fix #58 2022-05-28 21:14:55 +02:00
fincs
a491a8eb79
Use __3DS__ instead of _3DS 2021-08-07 13:11:39 +02:00
fincs
03235602cd
Add C3D_RenderTargetDetachOutput (called automatically on render target destroy) 2020-09-28 23:33:02 +02:00
fincs
3d566ac8da
Delete long-since obsolete flush functions 2020-05-05 01:06:36 +02:00
fincs
9d51a9445d Gas changes:
- Separate gas reg writes according to stages
- Related: Properly support C3D_GasAccMax
- Add C3D_GasBeginAcc
- Set correct gas depth function matching depth test in C3Di_EffectBind
2018-05-23 13:54:49 +02:00
fincs
8d8979947e Remove deprecated functionality 2018-05-22 16:56:19 +02:00
fincs
81ca5d3575 Begin adding Gas rendering support {incomplete/not fully RE'd} 2018-05-22 16:25:40 +02:00
fincs
c23a8015f3 Remove superfluous const in tex3ds.h/c 2018-03-02 19:42:22 +01:00
fincs
8f3fda7986 Deprecate C3D_SafeXYZ functions & replace them with C3D_SyncXYZ 2017-12-01 17:46:14 +01:00
fincs
b59cdc3c7c Deprecate C3D_RenderTargetSetClear, use C3D_RenderTargetClear instead 2017-12-01 17:46:14 +01:00
fincs
10e929d4bb Refactor texenv code in order to allow for stronger type checking 2017-12-01 17:46:14 +01:00
fincs
4ed5536bcc Add C3D_FrameEndHook() 2017-12-01 17:46:14 +01:00
Michael Theall
8764804dd5 Add tex3ds.h interface for loading assets converted by tex3ds 2017-12-01 17:42:24 +01:00
fincs
4ada36b6cd Remove deprecated renderbuffer code 2017-08-29 00:43:51 +02:00
fincs
52702d1f9f GPU_LUTINPUT_CP requires light env layer config 7 2017-05-30 17:52:50 +02:00
fincs
2062eff21d Add C3D_FrameCounter() for retrieving the value of the frame counter 2017-05-14 23:09:56 +02:00
fincs
9105ac3afb Add C3D_DirtyTexEnv 2017-04-26 16:34:59 +02:00
fincs
614a314888 Add strict checking for C3D_DEPTHTYPE in C++ too 2017-04-09 20:22:24 +02:00
fincs
35d82d95be Add Fog rendering support 2017-04-08 12:46:25 +02:00
fincs
a41dac3e3a Add C3D_EarlyDepthTest() {currently unusable due to glitchy rendering} 2017-04-02 17:14:49 +02:00
fincs
91b89c7a62 Allow for separate light amb/dif/spe colors 2017-03-30 23:42:58 +02:00
fincs
7354976bca Some tweaks to Spotlight support 2017-03-30 23:42:29 +02:00
fincs
370e938520 LightLut/LightEnv: generate/use proper LUTs for the [0,1] domain 2017-03-30 23:39:39 +02:00
fincs
2fc57e99b9 Replace most of the renderqueue logic with GX command queues, details:
- Removed double buffered gpu cmdbuffer (might be added back later)
- Added a global gxCmdQueue which by default is configured to run
  commands as they arrive (in the future it might be double buffered)
- Added C3D_FrameSync for explicitly waiting for "vblank"
- Repurposed C3D_FRAME_SYNCDRAW to perform C3D_FrameSync
- Added C3D_FrameSplit for splitting/submitting the gpu cmdlist in the
  middle of a renderqueue frame
- C3D_RenderTargetSetClear is still supported, however it's unofficially
  deprecated (it's performed after drawing/transferring instead of before
  drawing, which is pretty counter-intuitive)
- C3D_RenderTargetSetOutput is explicitly NOT deprecated since it's
  necessary to avoid screen tearing when transferring to the screen
  framebuffers (this stems from a Nintendo design flaw where screen swap
  processing is done immediately after GX transfers finish)
2017-03-26 20:24:23 +02:00
fincs
9f8f5e320a Added C3D_FrameBuf{Clear/Transfer} and C3D_Calc{Color/Depth}BufSize 2017-03-26 20:02:05 +02:00
fincs
1739f88e40 Add support for procedural textures (Texture Unit 3) 2017-03-15 16:49:06 +01:00
fincs
99be4ec656 Fix typo in C3D_TexGetImagePtr 2017-03-10 17:21:59 +01:00
fincs
c030f3e70a Use weak symbols instead of function pointers for optional features 2017-03-05 23:28:30 +01:00
fincs
5e156dd719 Add C3D_GetDrawingTime/C3D_GetProcessingTime 2017-02-16 14:39:48 +01:00
fincs
ac755aa3ec Add some shadow-related texture functions:
- C3D_TexShadowParams: configure GPUREG_TEXUNIT0_SHADOW
- C3D_TexInitShadow: create shadow map texture
- C3D_TexInitShadowCube: as above, but for shadow cubemaps
2017-02-14 19:40:07 +01:00
fincs
73f4039a9c Deprecate c3d/renderbuffer.h (use framebuffer or renderqueue instead) 2017-02-14 18:35:37 +01:00
fincs
a382eeed2b Use framebuffers instead of renderbuffers in rendertargets, details:
- The color buffer is mandatory, and it can either be a simple buffer
  (whose allocation lifetime managed automatically by citro3d), or be
  linked to a texture
- The depth buffer is optional, and it can only be a simple buffer
- Added C3D_RenderTargetCreateFromTex
- Clear bits in C3D_RenderTargetSetClear now work properly
2017-02-14 18:34:14 +01:00
fincs
5c1d037fa2 Introduce framebuffer (light renderbuffer) infrastructure 2017-02-14 18:24:57 +01:00
fincs
15de0e300e Add support for cube textures, see below:
- Added C3D_TexCube structure for holding pointers to all 6 faces
- C3D_TexLoadImage accepts face number and mipmap level
- C3D_TexGenerateMipmap accepts face number
- Added functions (C3D_Tex*GetImagePtr) for accessing image data
- Now using GX to copy texture data to VRAM instead of failing
- Moved texunit setup code to texture.c
2017-02-12 00:14:04 +01:00
fincs
6ec42ae8a1 Calculate total mipmap texture size with geometric series formula 2017-02-11 18:29:41 +01:00
fincs
0fd245b171 Begin overhauling texture API, see details:
- Now supports multilevel data (LOD) used for mipmapping
- Basic mipmap generation (currently only for RGBA8 and RGB8 textures)
- Texture type can now be specified (TODO: support cube textures)
- Border color can also be specified now
- More flexibility in texture initialization parameters
2017-02-09 20:07:37 +01:00
fincs
2a1dc2ba87 Added C3D_FragOpShadow() 2017-02-09 19:59:46 +01:00
fincs
73aea35120 Add bIsZBuffer parameter to C3D_DepthMap 2017-02-09 19:59:31 +01:00
fincs
a91889f5ba Added C3D_FrameRate() for controlling output framerate 2017-02-09 19:57:02 +01:00
Michael Theall
3ae31adab4 Add doxygen support 2017-02-09 19:45:33 +01:00
Thompson Lee
642545d2e2 Added Mtx_Add() and Mtx_Subtract(). (#28) 2016-09-12 00:23:21 +02:00
Thompson Lee
7960e832de Added Mtx_Diagonal(). (#27) 2016-09-11 23:40:10 +02:00
Thompson Lee
b32275ee94 Squashing all commits from the previous pull requests. #21, #22, and #23. (#26) 2016-08-30 21:18:37 +02:00
Thompson Lee
8a3982d625 Added Quat_FromPitchYawRoll() helper function. (#25)
Quickly converts pitch, yaw, and roll rotations to the Quaternion equivalent orientation, with optimized code.
2016-08-22 22:14:26 +02:00
Thompson Lee
ae0ce14c9d Enhancement: Mtx_Inverse() returns a non-zero determinant if the matrix passed in can be inverted, otherwise returns zero if the matrix is singular/degenerative. 2016-08-05 01:02:59 -05:00
Thompson Lee
59b0311f48 Minor Fixes series
- Added a missing @param[in].
- Added @mtheall 's Mtx_Multiply() enhancement.
2016-08-05 00:19:55 -05:00
mtheall
dc4d81eea9 More additions and enhancements to math code, see details (#19)
Added C3D_AngleFromDegrees
Added FVec4_PerspDivide
Added LH option for projections
2016-08-04 21:23:28 +02:00